refactor server
This commit is contained in:
1 parent
6cb538ce69
commit
acc910cbc0
48 files changed
+584
-650
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user