mirror of
https://github.com/xuthus83/pigallery2.git
synced 2024-11-03 21:04:03 +08: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