1
0
mirror of https://github.com/immich-app/immich.git synced 2024-12-25 10:43:13 +02:00

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];
}