fix: normal share gets attached to previously visited reverse share

This commit is contained in:
Elias Schneider
2025-01-21 18:57:33 +01:00
parent 2b7d3c0a8a
commit 3a534c7512
2 changed files with 8 additions and 2 deletions

View File

@@ -15,7 +15,10 @@ const list = async (): Promise<MyShare[]> => {
return (await api.get(`shares/all`)).data;
};
const create = async (share: CreateShare) => {
const create = async (share: CreateShare, isReverseShare = false) => {
if (!isReverseShare) {
deleteCookie("reverse_share_token");
}
return (await api.post("shares", share)).data;
};