chore(server): curly braces (#5361)

This commit is contained in:
Jason Rasmussen 2023-11-28 15:09:20 -05:00 committed by GitHub
parent cffdd9c86a
commit 5c1c174db1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 2 deletions

View file

@ -19,6 +19,7 @@ module.exports = {
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'error',
curly: 2,
'prettier/prettier': 0,
},
};

View file

@ -252,7 +252,9 @@ export class MetadataService {
try {
const reverseGeocode = await this.repository.reverseGeocode({ latitude, longitude });
if (!reverseGeocode) return;
if (!reverseGeocode) {
return;
}
Object.assign(exifData, reverseGeocode);
} catch (error: Error | any) {
this.logger.warn(

View file

@ -10,7 +10,9 @@ export class SystemMetadataRepository implements ISystemMetadataRepository {
) {}
async get<T extends keyof SystemMetadata>(key: T): Promise<SystemMetadata[T] | null> {
const metadata = await this.repository.findOne({ where: { key } });
if (!metadata) return null;
if (!metadata) {
return null;
}
return metadata.value as SystemMetadata[T];
}