mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-12-14 11:23:17 +02:00
improved logging
This commit is contained in:
parent
c08a2b35ba
commit
a95cd837cd
@ -69,6 +69,7 @@ export class SharingMWs {
|
||||
return next();
|
||||
|
||||
} catch (err) {
|
||||
console.warn(err);
|
||||
return next(new ErrorDTO(ErrorCodes.GENERAL_ERROR, 'Error during creating sharing link', err));
|
||||
}
|
||||
}
|
||||
|
@ -4,12 +4,13 @@ import {SQLConnection} from './SQLConnection';
|
||||
import {SharingEntity} from './enitites/SharingEntity';
|
||||
import {Config} from '../../../common/config/private/Config';
|
||||
import {PasswordHelper} from '../PasswordHelper';
|
||||
import {DeleteResult} from 'typeorm';
|
||||
|
||||
export class SharingManager implements ISharingManager {
|
||||
|
||||
private static async removeExpiredLink() {
|
||||
private static async removeExpiredLink(): Promise<DeleteResult> {
|
||||
const connection = await SQLConnection.getConnection();
|
||||
return connection
|
||||
return await connection
|
||||
.getRepository(SharingEntity)
|
||||
.createQueryBuilder('share')
|
||||
.where('expires < :now', {now: Date.now()})
|
||||
|
Loading…
Reference in New Issue
Block a user