style: clean up code formatting and remove trailing whitespace
refactor: reorganize imports and fix type imports
This commit is contained in:
1 parent
d3704602fd
commit
47c04de6fe
232 files changed
+7140
-4798
No files matched your search
+5
-6
@@ -31,7 +31,7 @@ function getJWTRefreshSecret(): string {
|
||||
const secret = process.env.JWT_REFRESH_SECRET;
|
||||
if (!secret) {
|
||||
throw new Error(
|
||||
"JWT_REFRESH_SECRET não está definido nas variáveis de ambiente"
|
||||
"JWT_REFRESH_SECRET não está definido nas variáveis de ambiente",
|
||||
);
|
||||
}
|
||||
return secret;
|
||||
@@ -55,7 +55,7 @@ interface TokenOptions {
|
||||
export function generateAccessToken(
|
||||
userId: number,
|
||||
username: string,
|
||||
options?: TokenOptions
|
||||
options?: TokenOptions,
|
||||
): string {
|
||||
const payload: TokenPayload = {
|
||||
userId,
|
||||
@@ -79,7 +79,7 @@ export function generateAccessToken(
|
||||
export function generateRefreshToken(
|
||||
userId: number,
|
||||
username: string,
|
||||
options?: TokenOptions
|
||||
options?: TokenOptions,
|
||||
): string {
|
||||
const payload: TokenPayload = {
|
||||
userId,
|
||||
@@ -118,7 +118,7 @@ export function verifyAccessToken(token: string): {
|
||||
tierSlug: decoded.tierSlug,
|
||||
tierLevel: decoded.tierLevel,
|
||||
};
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -147,8 +147,7 @@ export function verifyRefreshToken(token: string): {
|
||||
tierSlug: decoded.tierSlug,
|
||||
tierLevel: decoded.tierLevel,
|
||||
};
|
||||
} catch (error) {
|
||||
} catch (_error) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user