Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/thedevs-network/kutt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'server/handlers/links.ts')
-rw-r--r--server/handlers/links.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/server/handlers/links.ts b/server/handlers/links.ts
index a497cdd..857c857 100644
--- a/server/handlers/links.ts
+++ b/server/handlers/links.ts
@@ -108,8 +108,7 @@ export const create: Handler = async (req: CreateLinkReq, res) => {
};
export const edit: Handler = async (req, res) => {
- const { address, target, description, expire_in } = req.body;
-
+ const { address, target, description, expire_in, password } = req.body;
if (!address && !target) {
throw new CustomError("Should at least update one field.");
}
@@ -152,7 +151,8 @@ export const edit: Handler = async (req, res) => {
...(address && { address }),
...(description && { description }),
...(target && { target }),
- ...(expire_in && { expire_in })
+ ...(expire_in && { expire_in }),
+ ...(password && { password })
}
);