mirror of
https://github.com/immich-app/immich.git
synced 2025-01-12 15:32:36 +02:00
chore(server): curly braces (#5361)
This commit is contained in:
parent
cffdd9c86a
commit
5c1c174db1
@ -19,6 +19,7 @@ module.exports = {
|
|||||||
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
||||||
'@typescript-eslint/no-explicit-any': 'off',
|
'@typescript-eslint/no-explicit-any': 'off',
|
||||||
'@typescript-eslint/no-floating-promises': 'error',
|
'@typescript-eslint/no-floating-promises': 'error',
|
||||||
|
curly: 2,
|
||||||
'prettier/prettier': 0,
|
'prettier/prettier': 0,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -252,7 +252,9 @@ export class MetadataService {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
const reverseGeocode = await this.repository.reverseGeocode({ latitude, longitude });
|
const reverseGeocode = await this.repository.reverseGeocode({ latitude, longitude });
|
||||||
if (!reverseGeocode) return;
|
if (!reverseGeocode) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
Object.assign(exifData, reverseGeocode);
|
Object.assign(exifData, reverseGeocode);
|
||||||
} catch (error: Error | any) {
|
} catch (error: Error | any) {
|
||||||
this.logger.warn(
|
this.logger.warn(
|
||||||
|
@ -10,7 +10,9 @@ export class SystemMetadataRepository implements ISystemMetadataRepository {
|
|||||||
) {}
|
) {}
|
||||||
async get<T extends keyof SystemMetadata>(key: T): Promise<SystemMetadata[T] | null> {
|
async get<T extends keyof SystemMetadata>(key: T): Promise<SystemMetadata[T] | null> {
|
||||||
const metadata = await this.repository.findOne({ where: { key } });
|
const metadata = await this.repository.findOne({ where: { key } });
|
||||||
if (!metadata) return null;
|
if (!metadata) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return metadata.value as SystemMetadata[T];
|
return metadata.value as SystemMetadata[T];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user