refactor server

This commit is contained in:
Alex Holliday committed 2025-07-25 15:15:14 -07:00
1 parent 6cb538ce69
commit acc910cbc0
48 files changed
+584 -650

No files matched your search

+5
View File
@@ -2,6 +2,7 @@ const SERVICE_NAME = "userService";
class UserService {
static SERVICE_NAME = SERVICE_NAME;
constructor({ db, emailService, settingsService, logger, stringService, jwt, errorService }) {
this.db = db;
this.emailService = emailService;
@@ -12,6 +13,10 @@ class UserService {
this.errorService = errorService;
}
get serviceName() {
return UserService.SERVICE_NAME;
}
issueToken = (payload, appSettings) => {
const tokenTTL = appSettings?.jwtTTL ?? "2h";
const tokenSecret = appSettings?.jwtSecret;