Skip to content

Commit

Permalink
fix: Restore check if exist api
Browse files Browse the repository at this point in the history
Signed-off-by: leoliu <leoliu@yunify.com>
  • Loading branch information
leoliu committed Aug 12, 2020
1 parent d731d3e commit 2a01945
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions server/middlewares/checkIfExist.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ module.exports = async (ctx, next) => {

ctx.body = { exist: true }
} catch (error) {
if (error.code === 404) {
ctx.body = { exist: false }
}
ctx.body = { exist: false }
}
} else {
return await next()
Expand Down

0 comments on commit 2a01945

Please sign in to comment.