Skip to content

Conversation

@Utkarsh-m08
Copy link
Collaborator

No description provided.

@Utkarsh-m08 Utkarsh-m08 changed the base branch from dev to manish/engg-170 August 19, 2025 05:48
@Utkarsh-m08 Utkarsh-m08 changed the base branch from manish/engg-170 to dev August 19, 2025 05:49
@Utkarsh-m08 Utkarsh-m08 marked this pull request as draft August 19, 2025 05:49
@Utkarsh-m08 Utkarsh-m08 changed the base branch from dev to manish/engg-170 August 19, 2025 06:42
@Utkarsh-m08 Utkarsh-m08 changed the base branch from manish/engg-170 to dev August 19, 2025 09:12
@Utkarsh-m08
Copy link
Collaborator Author

Create Users

  • Helper functions
  • Endpoints and
  • API Integration
image image image

@askprateek askprateek changed the base branch from dev-backup to dev August 19, 2025 11:18
try {
const db = connectDb({ env: c.env });
const apiKey = (c.req.header("x-api-key") || "").trim();
const orgId = (c.req.param("orgId") || "").trim();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed

Copy link
Collaborator Author

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,
Copy link
Member

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.

Copy link
Collaborator Author

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",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use types

Copy link
Collaborator Author

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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENUM

Copy link
Collaborator Author

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];

@Utkarsh-m08 Utkarsh-m08 marked this pull request as ready for review August 20, 2025 06:43
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

Successfully merging this pull request may close these issues.

3 participants