fix: avatar error remove (#4173)

* fix: avatar error remove

* fix: index

* fix: guide

* fix: auth
This commit is contained in:
Archer
2025-03-14 20:13:06 +08:00
committed by GitHub
parent 93f7747904
commit f406c64d3c
7 changed files with 24 additions and 9 deletions

View File

@@ -76,7 +76,7 @@ export const refreshSourceAvatar = async (
const newId = getIdFromPath(path);
const oldId = getIdFromPath(oldPath);
if (!newId) return;
if (!newId || newId === oldId) return;
await MongoImage.updateOne({ _id: newId }, { $unset: { expiredTime: 1 } }, { session });