Making sure that if the app builders are updated through the API, they are ignored.

This commit is contained in:
mike12345567 2023-07-27 18:50:45 +01:00
parent 812f1af5ca
commit 7d978e0dec
1 changed files with 4 additions and 0 deletions

View File

@ -196,6 +196,10 @@ export class UserDB {
throw new Error("_id or email is required") throw new Error("_id or email is required")
} }
if (user.builder?.apps?.length && !await this.features.isAppBuildersEnabled()) {
throw new Error("Unable to update app builders, please check license")
}
let dbUser: User | undefined let dbUser: User | undefined
if (_id) { if (_id) {
// try to get existing user from db // try to get existing user from db