fix2 tokens
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
import { api } from "@rustpad/api";
|
||||
import { askConfirm } from "@rustpad/modal";
|
||||
import { NoteSocket, PadSocket } from "@rustpad/socket";
|
||||
import { withShareToken } from "@rustpad/url-state";
|
||||
|
||||
function encode(value) {
|
||||
return encodeURIComponent(value);
|
||||
@@ -60,7 +59,6 @@ export function createWorkspaceNoteAdapter() {
|
||||
const workspaceSlug = parts[1];
|
||||
const noteSlug = parts[3];
|
||||
const base = `/api/workspaces/${encode(workspaceSlug)}/notes/${encode(noteSlug)}`;
|
||||
const shareToken = new URLSearchParams(location.search).get("share");
|
||||
|
||||
return {
|
||||
access: { kind: "workspace", key: workspaceSlug },
|
||||
@@ -106,7 +104,7 @@ export function createWorkspaceNoteAdapter() {
|
||||
method: "DELETE",
|
||||
body: JSON.stringify({ access_token: accessToken || null }),
|
||||
});
|
||||
location.assign(withShareToken(`/w/${encode(workspaceSlug)}`, shareToken));
|
||||
location.assign(`/w/${encode(workspaceSlug)}`);
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user