mirror of
https://github.com/swissmakers/swiss-datashare.git
synced 2026-04-17 12:43:13 +02:00
fix: normal shares were added to the previous reverse share
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user