소스 검색

fix not getting link when reuse is set to true

Pouria Ezzati 1 년 전
부모
커밋
fbfcb07324
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      server/handlers/links.handler.js

+ 1 - 1
server/handlers/links.handler.js

@@ -126,7 +126,7 @@ async function create(req, res) {
   // if "reuse" is true, try to return
   // the existent URL without creating one
   if (tasks[2]) {
-    return res.json(utils.sanitize.link(tasks[3]));
+    return res.json(utils.sanitize.link(tasks[2]));
   }
   
   // Check if custom link already exists