chore: reformat all code with prettier

This commit is contained in:
modeco80
2024-04-24 03:50:17 -04:00
parent bcbf7db8d9
commit ddae307874
13 changed files with 1053 additions and 1074 deletions

View File

@@ -1,12 +1,11 @@
import { Logger } from '@cvmts/shared';
import { Rank, User } from './User.js';
export default class AuthManager {
apiEndpoint: string;
secretKey: string;
private logger = new Logger("CVMTS.AuthMan");
private logger = new Logger('CVMTS.AuthMan');
constructor(apiEndpoint: string, secretKey: string) {
this.apiEndpoint = apiEndpoint;
@@ -14,7 +13,7 @@ export default class AuthManager {
}
async Authenticate(token: string, user: User): Promise<JoinResponse> {
var response = await fetch(this.apiEndpoint + '/api/v1/join', {
let response = await fetch(this.apiEndpoint + '/api/v1/join', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
@@ -26,7 +25,7 @@ export default class AuthManager {
})
});
var json = (await response.json()) as JoinResponse;
let json = (await response.json()) as JoinResponse;
if (!json.success) {
this.logger.Error(`Failed to query auth server: ${json.error}`);