0
Fork 0
mirror of https://github.com/stonith404/pingvin-share.git synced 2025-01-15 01:14:27 -05:00

refactor: simplify create share function

This commit is contained in:
Elias Schneider 2023-04-04 22:47:32 +02:00
parent 2ca0092b71
commit b7db9b9b40
No known key found for this signature in database
GPG key ID: 07E623B294202B6C

View file

@ -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) => {