⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.
TypeScript honoissue-managementissue-trackerjira-alternativekanbanlinear-alternativemcpproject-managementreactself-hostedtypescript
feat(api): wire user locale into auth and API validation
Tinfff7d5e79000
diff --git a/apps/api/src/auth.ts b/apps/api/src/auth.tsindex e8d6b24f9..b5487bf7a 100644--- a/apps/api/src/auth.ts+++ b/apps/api/src/auth.ts@@ -93,6 +93,15 @@ export const auth = betterAuth({apikey: schema.apikeyTable,},}),+ user: {+ additionalFields: {+ locale: {+ type: "string",+ input: true,+ required: false,+ },+ },+ },emailAndPassword: {enabled: true,autoSignIn: true,@@ -201,6 +210,11 @@ export const auth = betterAuth({},async sendInvitationEmail(data) {const inviteLink = `${process.env.KANEO_CLIENT_URL}/invitation/accept/${data.id}`;+ const [invitedUser] = await db+ .select({ locale: schema.userTable.locale })+ .from(schema.userTable)+ .where(eq(schema.userTable.email, data.email))+ .limit(1);const result = await sendWorkspaceInvitationEmail(data.email,@@ -208,6 +222,7 @@ export const auth = betterAuth({{inviterEmail: data.inviter.user.email,inviterName: data.inviter.user.name,+ locale: invitedUser?.locale ?? null,workspaceName: data.organization.name,invitationLink: inviteLink,to: data.email,diff --git a/apps/api/src/schemas.ts b/apps/api/src/schemas.tsindex bd3f59132..ec7700f19 100644--- a/apps/api/src/schemas.ts+++ b/apps/api/src/schemas.ts@@ -60,6 +60,7 @@ export const activitySchema = v.object({createdAt: v.date(),userId: v.nullable(v.string()),content: v.nullable(v.string()),+ eventData: v.nullable(v.record(v.string(), v.unknown())),externalUserName: v.nullable(v.string()),externalUserAvatar: v.nullable(v.string()),externalSource: v.nullable(v.string()),@@ -80,7 +81,7 @@ export const timeEntrySchema = v.object({export const notificationSchema = v.object({id: v.string(),userId: v.string(),- title: v.string(),+ title: v.nullable(v.string()),content: v.nullable(v.string()),type: v.picklist(["info",@@ -90,6 +91,7 @@ export const notificationSchema = v.object({"task_assignee_changed","time_entry_created",] as const),+ eventData: v.nullable(v.record(v.string(), v.unknown())),isRead: v.optional(v.boolean()),resourceId: v.optional(v.string()),resourceType: v.optional(v.picklist(["task", "workspace"] as const)),