Skip to content

📈 Open source, privacy-first web analytics — a cookie-less Google Analytics alternative with built-in error tracking and performance monitoring. Self-host it or use our cloud. Get started for free!

minor improvements

Blue Mouse62276458e196
diff --git a/src/user/entities/user.entity.ts b/src/user/entities/user.entity.ts
index e3b084f50..46f24f0e0 100644
--- a/src/user/entities/user.entity.ts
+++ b/src/user/entities/user.entity.ts
@@ -143,6 +143,7 @@ export class User {
@Column({
type: 'enum',
enum: BillingFrequency,
+ nullable: true,
})
billingFrequency: BillingFrequency
diff --git a/src/user/user.controller.ts b/src/user/user.controller.ts
index 9fd724e3a..ecf069b91 100644
--- a/src/user/user.controller.ts
+++ b/src/user/user.controller.ts
@@ -307,7 +307,7 @@ export class UserController {
}
// delete internal properties from userDTO before updating it
// todo: use _pick instead of _omit
- const userToUpdate = _omit(userDTO, ['id', 'sharedProjects', 'isActive', 'evWarningSentOn', 'exportedAt', 'subID', 'subUpdateURL', 'subCancelURL', 'projects', 'actionTokens', 'roles', 'created', 'updated', 'planCode'])
+ const userToUpdate = _omit(userDTO, ['id', 'sharedProjects', 'isActive', 'evWarningSentOn', 'exportedAt', 'subID', 'subUpdateURL', 'subCancelURL', 'projects', 'actionTokens', 'roles', 'created', 'updated', 'planCode', 'billingFrequency', 'nextBillDate'])
await this.userService.update(id, userToUpdate)
const updatedUser = await this.userService.findOneWhere({ id })