-
Notifications
You must be signed in to change notification settings - Fork 0
API Integration | User Management #27
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
base: dev
Are you sure you want to change the base?
Conversation
| try { | ||
| const db = connectDb({ env: c.env }); | ||
| const apiKey = (c.req.header("x-api-key") || "").trim(); | ||
| const orgId = (c.req.param("orgId") || "").trim(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed from api key
| roleId: UserOrganizationTable.roleId, | ||
| isOwner: UserOrganizationTable.isOwner, | ||
| roleName: RoleTable.name, | ||
| joinedAt: UserOrganizationTable.createdAt, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't change key names anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are changing key names as we have names key coming from UserTable as well (chk lines 314).
Please suggest a different way if possible.
| email: "", | ||
| name: "", | ||
| roleId: "", | ||
| employeeType: "FULL_TIME" as "FULL_TIME" | "PART_TIME", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use types
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
| status: "Active" | "Inactive"; | ||
| image: string | null; | ||
| phone: string | null; | ||
| employeeType: "FULL_TIME" | "PART_TIME"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ENUM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done using enums now.
created Types from enums in schema like this -
export type EmployeeType = (typeof employeeTypeEnum.enumValues)[number];



No description provided.