Requested changes

This commit is contained in:
Daniel Hougaard
2024-09-10 11:07:25 +04:00
parent e6c0bbb25b
commit 54e6f4b607
4 changed files with 12 additions and 6 deletions
+2 -2
View File
@@ -43,7 +43,7 @@ export const registerLoginRouter = async (server: FastifyZodProvider) => {
schema: {
body: z.object({
organizationId: z.string().trim(),
customUserAgent: z.enum(["cli"]).optional()
userAgent: z.enum(["cli"]).optional()
}),
response: {
200: z.object({
@@ -54,7 +54,7 @@ export const registerLoginRouter = async (server: FastifyZodProvider) => {
handler: async (req, res) => {
const cfg = getConfig();
const tokens = await server.services.login.selectOrganization({
userAgent: req.body.customUserAgent ?? req.headers["user-agent"],
userAgent: req.body.userAgent ?? req.headers["user-agent"],
authJwtToken: req.headers.authorization,
organizationId: req.body.organizationId,
ipAddress: req.realIp