mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor(auth): set null when the findAdmin is null
This commit is contained in:
@@ -38,15 +38,16 @@ export const createAdmin = async (input: typeof apiCreateAdmin._type) => {
|
||||
});
|
||||
}
|
||||
|
||||
if (!IS_CLOUD) {
|
||||
await tx
|
||||
.insert(admins)
|
||||
.values({
|
||||
authId: newAuth.id,
|
||||
await tx
|
||||
.insert(admins)
|
||||
.values({
|
||||
authId: newAuth.id,
|
||||
...(!IS_CLOUD && {
|
||||
serverIp: await getPublicIpWithFallback(),
|
||||
})
|
||||
.returning();
|
||||
}
|
||||
}),
|
||||
serverIp: await getPublicIpWithFallback(),
|
||||
})
|
||||
.returning();
|
||||
|
||||
return newAuth;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user