mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-29 01:28:59 -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";
|
import api from "./api.service";
|
||||||
|
|
||||||
const create = async (share: CreateShare) => {
|
const create = async (share: CreateShare) => {
|
||||||
const { id, expiration, recipients, security, description } = share;
|
return (await api.post("shares", share)).data;
|
||||||
return (
|
|
||||||
await api.post("shares", {
|
|
||||||
id,
|
|
||||||
expiration,
|
|
||||||
recipients,
|
|
||||||
security,
|
|
||||||
description,
|
|
||||||
})
|
|
||||||
).data;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const completeShare = async (id: string) => {
|
const completeShare = async (id: string) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue