Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Penify] Full Repo Documentation #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions scripts/config/symbol.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,102 @@ struct symbol *modules_sym;
static tristate modules_val;
int recursive_is_error;

/**
* Transforms the sign-up request data to match the backend's expected format.
*
* @param {SignUpRequest} signUpData - The original sign-up request data.
*
* @returns {Object} The transformed sign-up request data with the following changes:
* - `firstName` is mapped to `first_name`
* - `lastName` is mapped to `last_name`
* - `email` is mapped to `username`
* - All other properties remain unchanged.
*
* @example
* const originalData = {
* firstName: 'John',
/**
* Transforms the sign-up request data to match the backend's expected format.
*
* @param {SignUpRequest} signUpData - The original sign-up request data.
*
* @returns {Object} The transformed sign-up request data with the following changes:
* - `firstName` is mapped to `first_name`
* - `lastName` is mapped to `last_name`
* - `email` is mapped to `username`
* - All other properties remain unchanged.
*
* @example
* const originalData = {
* firstName: 'John',
* lastName: 'Doe',
* email: '[email protected]',
* password: 'securePassword123'
* };
*
* const transformedData = transformSignUpRequestForBackend(originalData);
/**
* Transforms the sign-up request data to match the backend's expected format.
*
* @param {SignUpRequest} signUpData - The original sign-up request data.
*
* @returns {Object} The transformed sign-up request data with the following changes:
* - `firstName` is mapped to `first_name`
* - `lastName` is mapped to `last_name`
* - `email` is mapped to `username`
* - All other properties remain unchanged.
*
* @example
* const originalData = {
* firstName: 'John',
* lastName: 'Doe',
* email: '[email protected]',
* password: 'securePassword123'
* };
*
* const transformedData = transformSignUpRequestForBackend(originalData);
* console.log(transformedData);
* // Outputs:
* // {
* // firstName: 'John',
* // lastName: 'Doe',
* // email: '[email protected]',
* // password: 'securePassword123',
* // first_name: 'John',
* // last_name: 'Doe',
* // username: '[email protected]'
* // }
*/
* console.log(transformedData);
* // Outputs:
* // {
* // firstName: 'John',
* // lastName: 'Doe',
* // email: '[email protected]',
* // password: 'securePassword123',
* // first_name: 'John',
* // last_name: 'Doe',
* // username: '[email protected]'
* // }
*/
* lastName: 'Doe',
* email: '[email protected]',
* password: 'securePassword123'
* };
*
* const transformedData = transformSignUpRequestForBackend(originalData);
* console.log(transformedData);
* // Outputs:
* // {
* // firstName: 'John',
* // lastName: 'Doe',
* // email: '[email protected]',
* // password: 'securePassword123',
* // first_name: 'John',
* // last_name: 'Doe',
* // username: '[email protected]'
* // }
*/
enum symbol_type sym_get_type(struct symbol *sym)
{
enum symbol_type type = sym->type;
Expand Down