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

Structuring of various data fields in request object #68

Open
Zolo-Ryan opened this issue Jul 11, 2024 · 0 comments
Open

Structuring of various data fields in request object #68

Zolo-Ryan opened this issue Jul 11, 2024 · 0 comments

Comments

@Zolo-Ryan
Copy link
Collaborator

Currently some properties from the request.body takes data in form of object | string. Then are JSON.stringify to store in the data property of the db.tableName.

Source of problems and where to store:

  • additionalData in user.dto.ts on CreateUserDto and UpdateUserDto currently object | string. To store in User.data => {userData,additionalData}

  • data in user.dto.ts on CreateUserRegistrationDto and UpdateUserRegistrationDto currently string | JSON | object. To store in UserRegistration.data => {...data,...UserRegistrationData}

  • CreateTenantDto in tenant.dto.ts don't have any data field. Add it and provide it a proper interface. To store in Tenant.data => data

  • UpdateTenantDto in tenant.dto.ts have data as string | JSON. Give it same interface as above. To store in Tenant.data => data

  • metaData on CreateApiKeyDto in apiKey.dto.ts currently string | JSON. To store in AuthenticationKey.metaData => metaData.

  • data on RefreshToken to be made String?, no such use is though till now.

Currently correct and don't need attention:

  • Application don't take any data in request object, nor is it needed. As Application.data stores {oauthConfiguration,jwtConfiguration}
  • Keys don't take any data. Key.data is reserved to store jwks which was created while generating the keys. Before storing the jwks into data, all the private fields are deleted.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant