Explorar o código

narrow down to users whose imageUrlCached is null

Shun Miyazawa %!s(int64=4) %!d(string=hai) anos
pai
achega
06eacb8aff
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/app/src/server/routes/apiv3/users.js

+ 1 - 1
packages/app/src/server/routes/apiv3/users.js

@@ -743,7 +743,7 @@ module.exports = (crowi) => {
   router.put('/update.imageUrlCache', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
   router.put('/update.imageUrlCache', loginRequiredStrictly, adminRequired, csrf, async(req, res) => {
     try {
     try {
       const userIds = req.body.userIds;
       const userIds = req.body.userIds;
-      const users = await User.find({ _id: { $in: userIds } });
+      const users = await User.find({ _id: { $in: userIds }, imageUrlCached: null });
       const requests = await Promise.all(users.map(async(user) => {
       const requests = await Promise.all(users.map(async(user) => {
         return {
         return {
           updateOne: {
           updateOne: {