mirror of
https://github.com/dokploy/dokploy.git
synced 2026-06-14 03:19:49 +00:00
Update better-auth dependency to version 1.2.8 and enhance license key validation in the API to require at least one of enableEnterpriseFeatures or licenseKey.
This commit is contained in:
@@ -94,7 +94,7 @@
|
||||
"ai": "^5.0.17",
|
||||
"ai-sdk-ollama": "^0.5.1",
|
||||
"bcrypt": "5.1.1",
|
||||
"better-auth": "v1.2.8-beta.7",
|
||||
"better-auth": "v1.2.8",
|
||||
"bl": "6.0.11",
|
||||
"boxen": "^7.1.1",
|
||||
"bullmq": "5.4.2",
|
||||
|
||||
@@ -35,15 +35,22 @@ export const licenseKeyRouter = createTRPCRouter({
|
||||
.mutation(async ({ ctx, input }) => {
|
||||
const currentUserId = ctx.user.id;
|
||||
|
||||
if (
|
||||
input.enableEnterpriseFeatures === undefined &&
|
||||
input.licenseKey === undefined
|
||||
) {
|
||||
throw new TRPCError({
|
||||
code: "BAD_REQUEST",
|
||||
message:
|
||||
"At least one of enableEnterpriseFeatures or licenseKey must be provided",
|
||||
});
|
||||
}
|
||||
|
||||
await db
|
||||
.update(user)
|
||||
.set({
|
||||
...(input.enableEnterpriseFeatures === undefined
|
||||
? {}
|
||||
: { enableEnterpriseFeatures: input.enableEnterpriseFeatures }),
|
||||
...(input.licenseKey === undefined
|
||||
? {}
|
||||
: { licenseKey: input.licenseKey }),
|
||||
// enableEnterpriseFeatures: input.enableEnterpriseFeatures ?? false,
|
||||
licenseKey: input.licenseKey ?? "",
|
||||
})
|
||||
.where(eq(user.id, currentUserId));
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
"ai": "^5.0.17",
|
||||
"ai-sdk-ollama": "^0.5.1",
|
||||
"bcrypt": "5.1.1",
|
||||
"better-auth": "v1.2.8-beta.7",
|
||||
"better-auth": "v1.2.8",
|
||||
"bl": "6.0.11",
|
||||
"boxen": "^7.1.1",
|
||||
"date-fns": "3.6.0",
|
||||
|
||||
Generated
+7
-7
@@ -260,8 +260,8 @@ importers:
|
||||
specifier: 5.1.1
|
||||
version: 5.1.1
|
||||
better-auth:
|
||||
specifier: v1.2.8-beta.7
|
||||
version: 1.2.8-beta.7
|
||||
specifier: v1.2.8
|
||||
version: 1.2.8
|
||||
bl:
|
||||
specifier: 6.0.11
|
||||
version: 6.0.11
|
||||
@@ -640,8 +640,8 @@ importers:
|
||||
specifier: 5.1.1
|
||||
version: 5.1.1
|
||||
better-auth:
|
||||
specifier: v1.2.8-beta.7
|
||||
version: 1.2.8-beta.7
|
||||
specifier: v1.2.8
|
||||
version: 1.2.8
|
||||
bl:
|
||||
specifier: 6.0.11
|
||||
version: 6.0.11
|
||||
@@ -4237,8 +4237,8 @@ packages:
|
||||
before-after-hook@2.2.3:
|
||||
resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==}
|
||||
|
||||
better-auth@1.2.8-beta.7:
|
||||
resolution: {integrity: sha512-gVApvvhnPVqMCYYLMhxUfbTi5fJYfp9rcsoJSjjTOMV+CIc7KVlYN6Qo8E7ju1JeRU5ae1Wl1NdXrolRJHjmaQ==}
|
||||
better-auth@1.2.8:
|
||||
resolution: {integrity: sha512-y8ry7ZW3/3ZIr82Eo1zUDtMzdoQlFnwNuZ0+b0RxoNZgqmvgTIc/0tCDC7NDJerqSu4UCzer0dvYxBsv3WMIGg==}
|
||||
|
||||
better-call@1.0.19:
|
||||
resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==}
|
||||
@@ -11229,7 +11229,7 @@ snapshots:
|
||||
|
||||
before-after-hook@2.2.3: {}
|
||||
|
||||
better-auth@1.2.8-beta.7:
|
||||
better-auth@1.2.8:
|
||||
dependencies:
|
||||
'@better-auth/utils': 0.2.5
|
||||
'@better-fetch/fetch': 1.1.18
|
||||
|
||||
Reference in New Issue
Block a user