Skip to content

Commit

Permalink
fix: normal shares were added to the previous reverse share
Browse files Browse the repository at this point in the history
  • Loading branch information
stonith404 committed Apr 5, 2024
1 parent 3c5e0ad commit 3972589
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions frontend/src/services/share.service.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setCookie } from "cookies-next";
import { deleteCookie, setCookie } from "cookies-next";
import mime from "mime-types";
import { FileUploadResponse } from "../types/File.type";

Expand All @@ -16,7 +16,9 @@ const create = async (share: CreateShare) => {
};

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) => {
Expand Down

0 comments on commit 3972589

Please sign in to comment.