mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-15 16:35:17 +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": "^5.0.17",
|
||||||
"ai-sdk-ollama": "^0.5.1",
|
"ai-sdk-ollama": "^0.5.1",
|
||||||
"bcrypt": "5.1.1",
|
"bcrypt": "5.1.1",
|
||||||
"better-auth": "v1.2.8-beta.7",
|
"better-auth": "v1.2.8",
|
||||||
"bl": "6.0.11",
|
"bl": "6.0.11",
|
||||||
"boxen": "^7.1.1",
|
"boxen": "^7.1.1",
|
||||||
"bullmq": "5.4.2",
|
"bullmq": "5.4.2",
|
||||||
|
|||||||
@@ -35,15 +35,22 @@ export const licenseKeyRouter = createTRPCRouter({
|
|||||||
.mutation(async ({ ctx, input }) => {
|
.mutation(async ({ ctx, input }) => {
|
||||||
const currentUserId = ctx.user.id;
|
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
|
await db
|
||||||
.update(user)
|
.update(user)
|
||||||
.set({
|
.set({
|
||||||
...(input.enableEnterpriseFeatures === undefined
|
// enableEnterpriseFeatures: input.enableEnterpriseFeatures ?? false,
|
||||||
? {}
|
licenseKey: input.licenseKey ?? "",
|
||||||
: { enableEnterpriseFeatures: input.enableEnterpriseFeatures }),
|
|
||||||
...(input.licenseKey === undefined
|
|
||||||
? {}
|
|
||||||
: { licenseKey: input.licenseKey }),
|
|
||||||
})
|
})
|
||||||
.where(eq(user.id, currentUserId));
|
.where(eq(user.id, currentUserId));
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
"ai": "^5.0.17",
|
"ai": "^5.0.17",
|
||||||
"ai-sdk-ollama": "^0.5.1",
|
"ai-sdk-ollama": "^0.5.1",
|
||||||
"bcrypt": "5.1.1",
|
"bcrypt": "5.1.1",
|
||||||
"better-auth": "v1.2.8-beta.7",
|
"better-auth": "v1.2.8",
|
||||||
"bl": "6.0.11",
|
"bl": "6.0.11",
|
||||||
"boxen": "^7.1.1",
|
"boxen": "^7.1.1",
|
||||||
"date-fns": "3.6.0",
|
"date-fns": "3.6.0",
|
||||||
|
|||||||
Generated
+7
-7
@@ -260,8 +260,8 @@ importers:
|
|||||||
specifier: 5.1.1
|
specifier: 5.1.1
|
||||||
version: 5.1.1
|
version: 5.1.1
|
||||||
better-auth:
|
better-auth:
|
||||||
specifier: v1.2.8-beta.7
|
specifier: v1.2.8
|
||||||
version: 1.2.8-beta.7
|
version: 1.2.8
|
||||||
bl:
|
bl:
|
||||||
specifier: 6.0.11
|
specifier: 6.0.11
|
||||||
version: 6.0.11
|
version: 6.0.11
|
||||||
@@ -640,8 +640,8 @@ importers:
|
|||||||
specifier: 5.1.1
|
specifier: 5.1.1
|
||||||
version: 5.1.1
|
version: 5.1.1
|
||||||
better-auth:
|
better-auth:
|
||||||
specifier: v1.2.8-beta.7
|
specifier: v1.2.8
|
||||||
version: 1.2.8-beta.7
|
version: 1.2.8
|
||||||
bl:
|
bl:
|
||||||
specifier: 6.0.11
|
specifier: 6.0.11
|
||||||
version: 6.0.11
|
version: 6.0.11
|
||||||
@@ -4237,8 +4237,8 @@ packages:
|
|||||||
[email protected]:
|
[email protected]:
|
||||||
resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==}
|
resolution: {integrity: sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==}
|
||||||
|
|
||||||
[email protected]-beta.7:
|
[email protected]:
|
||||||
resolution: {integrity: sha512-gVApvvhnPVqMCYYLMhxUfbTi5fJYfp9rcsoJSjjTOMV+CIc7KVlYN6Qo8E7ju1JeRU5ae1Wl1NdXrolRJHjmaQ==}
|
resolution: {integrity: sha512-y8ry7ZW3/3ZIr82Eo1zUDtMzdoQlFnwNuZ0+b0RxoNZgqmvgTIc/0tCDC7NDJerqSu4UCzer0dvYxBsv3WMIGg==}
|
||||||
|
|
||||||
[email protected]:
|
[email protected]:
|
||||||
resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==}
|
resolution: {integrity: sha512-sI3GcA1SCVa3H+CDHl8W8qzhlrckwXOTKhqq3OOPXjgn5aTOMIqGY34zLY/pHA6tRRMjTUC3lz5Mi7EbDA24Kw==}
|
||||||
@@ -11229,7 +11229,7 @@ snapshots:
|
|||||||
|
|
||||||
[email protected]: {}
|
[email protected]: {}
|
||||||
|
|
||||||
[email protected]-beta.7:
|
[email protected]:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@better-auth/utils': 0.2.5
|
'@better-auth/utils': 0.2.5
|
||||||
'@better-fetch/fetch': 1.1.18
|
'@better-fetch/fetch': 1.1.18
|
||||||
|
|||||||
Reference in New Issue
Block a user