0
Fork 0
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:
Elias Schneider 2024-04-05 13:54:36 +02:00
parent 3c5e0ad513
commit 3972589f76
No known key found for this signature in database
GPG key ID: 07E623B294202B6C

View file

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