Fix remote drive expire (#7543)
This commit is contained in:
parent
52e54cf0dc
commit
0263539202
3 changed files with 7 additions and 2 deletions
|
|
@ -267,7 +267,8 @@ async function upload(key: string, stream: fs.ReadStream | Buffer, type: string,
|
|||
|
||||
async function deleteOldFile(user: IRemoteUser) {
|
||||
const q = DriveFiles.createQueryBuilder('file')
|
||||
.where('file.userId = :userId', { userId: user.id });
|
||||
.where('file.userId = :userId', { userId: user.id })
|
||||
.andWhere('file.isLink = FALSE');
|
||||
|
||||
if (user.avatarId) {
|
||||
q.andWhere('file.id != :avatarId', { avatarId: user.avatarId });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue