From b7db9b9b40c6143e3aca5e76a9bcb64e319cff57 Mon Sep 17 00:00:00 2001 From: Elias Schneider Date: Tue, 4 Apr 2023 22:47:32 +0200 Subject: [PATCH] refactor: simplify create share function --- frontend/src/services/share.service.ts | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/frontend/src/services/share.service.ts b/frontend/src/services/share.service.ts index 2d03bb13..26f6a1ac 100644 --- a/frontend/src/services/share.service.ts +++ b/frontend/src/services/share.service.ts @@ -12,16 +12,7 @@ import { import api from "./api.service"; const create = async (share: CreateShare) => { - const { id, expiration, recipients, security, description } = share; - return ( - await api.post("shares", { - id, - expiration, - recipients, - security, - description, - }) - ).data; + return (await api.post("shares", share)).data; }; const completeShare = async (id: string) => {