mirror of
https://github.com/stonith404/pingvin-share.git
synced 2025-01-15 01:14:27 -05:00
fix: normal shares were added to the previous reverse share
This commit is contained in:
parent
3c5e0ad513
commit
3972589f76
1 changed files with 4 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
||||||
import { setCookie } from "cookies-next";
|
import { deleteCookie, setCookie } from "cookies-next";
|
||||||
import mime from "mime-types";
|
import mime from "mime-types";
|
||||||
import { FileUploadResponse } from "../types/File.type";
|
import { FileUploadResponse } from "../types/File.type";
|
||||||
|
|
||||||
|
@ -16,7 +16,9 @@ const create = async (share: CreateShare) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
const completeShare = async (id: string) => {
|
const completeShare = async (id: string) => {
|
||||||
return (await api.post(`shares/${id}/complete`)).data;
|
const response = (await api.post(`shares/${id}/complete`)).data;
|
||||||
|
deleteCookie("reverse_share_token");
|
||||||
|
return response;
|
||||||
};
|
};
|
||||||
|
|
||||||
const revertComplete = async (id: string) => {
|
const revertComplete = async (id: string) => {
|
||||||
|
|
Loading…
Add table
Reference in a new issue