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:
parent
2ca0092b71
commit
b7db9b9b40
1 changed files with 1 additions and 10 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue