Skip to content

Commit 90904fd

Browse files
committed
prettier
1 parent edf7e24 commit 90904fd

7 files changed

Lines changed: 22 additions & 17 deletions

File tree

backend/src/controllers/users-controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export class UsersController {
4040
public constructor(
4141
@Inject(UserServiceToken) private readonly _users: IUserService,
4242
@Inject(ApplicationServiceToken)
43-
private readonly _applications: IApplicationService
43+
private readonly _applications: IApplicationService,
4444
) {}
4545

4646
/**

backend/src/middlewares/error-handler-middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export class ErrorHandlerMiddleware implements ExpressErrorMiddlewareInterface {
8383

8484
if (error.httpCode) {
8585
// Log all errors in debug mode
86-
this._logger.debug(`Error: ${error.message} ${error.stack}`)
86+
this._logger.debug(`Error: ${error.message} ${error.stack}`);
8787
} else {
8888
// Only log errors in production that aren't planned http error responses
8989
this._logger.error(error.message, { stack: error.stack });

backend/src/services/database-service.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {
1212
IConfigurationService,
1313
} from "./config-service";
1414
import { ILoggerService, LoggerServiceToken } from "./logger-service";
15-
import {ObjectLiteral} from "typeorm/common/ObjectLiteral";
15+
import { ObjectLiteral } from "typeorm/common/ObjectLiteral";
1616

1717
type Entity<T> = new () => T;
1818

@@ -76,7 +76,9 @@ export class DatabaseService implements IDatabaseService {
7676
* Gets a repository for the given entity.
7777
* @param entity The entity to get a repository for
7878
*/
79-
public getRepository<T extends ObjectLiteral>(entity: Entity<T>): Repository<T> {
79+
public getRepository<T extends ObjectLiteral>(
80+
entity: Entity<T>,
81+
): Repository<T> {
8082
return this._connection.manager.getRepository<T>(entity);
8183
}
8284
}

backend/src/services/email-template-service.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { EmailTemplate } from "../entities/settings";
44
import { User } from "../entities/user";
55
import { EmailServiceToken, IEmailService } from "./email-service";
66
import { ISettingsService, SettingsServiceToken } from "./settings-service";
7-
import {ObjectLiteral} from "typeorm/common/ObjectLiteral";
7+
import { ObjectLiteral } from "typeorm/common/ObjectLiteral";
88

99
interface IVerifyEmailContext {
1010
verifyToken: string;
@@ -61,7 +61,10 @@ export class EmailTemplateService implements IEmailTemplateService {
6161
* @param text The text to compile
6262
* @param context The context to inject into the template
6363
*/
64-
private compile<TContext extends ObjectLiteral>(text: string, context: TContext): string {
64+
private compile<TContext extends ObjectLiteral>(
65+
text: string,
66+
context: TContext,
67+
): string {
6568
return [...Object.entries(context)].reduce(
6669
(replacedText, [variable, value]) =>
6770
replacedText.replace(new RegExp(`{{${variable}}}`, "g"), value),

backend/src/services/logger-service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ interface ICallerInformation {
1414
}
1515

1616
interface ILoggerMetadata {
17-
caller: ICallerInformation
18-
meta: any[]
17+
caller: ICallerInformation;
18+
meta: any[];
1919
}
2020

2121
/**

backend/src/services/user-service.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,14 +293,12 @@ export class UserService implements IUserService {
293293
public async findUserByLoginToken(token: string): Promise<User | null> {
294294
try {
295295
const { secret } = this._tokens.decode(token);
296-
return await this._users.findOne(
297-
{
298-
where: {
299-
tokenSecret: secret
300-
},
301-
cache: 20 * 1000,
296+
return await this._users.findOne({
297+
where: {
298+
tokenSecret: secret,
302299
},
303-
);
300+
cache: 20 * 1000,
301+
});
304302
} catch (error) {
305303
return null;
306304
}
@@ -336,7 +334,7 @@ export class UserService implements IUserService {
336334
return await this._users.findOneByOrFail({ id: user.id });
337335
}
338336

339-
return null
337+
return null;
340338
}
341339

342340
/**

backend/test/services/mock/mock-database-service.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export class TestDatabaseService implements IDatabaseService {
2828
/**
2929
* @inheritdoc
3030
*/
31-
public getRepository<T extends ObjectLiteral>(entity: new () => T): Repository<T> {
31+
public getRepository<T extends ObjectLiteral>(
32+
entity: new () => T,
33+
): Repository<T> {
3234
return this._connection.getRepository<T>(entity);
3335
}
3436

0 commit comments

Comments
 (0)