new functions
This commit is contained in:
@@ -15,6 +15,8 @@ export function createPadAdapter() {
|
||||
addressSelector: "#pad-url",
|
||||
title: info => `${info.title} · RustPad`,
|
||||
loadInfo: headers => api(base, { headers }),
|
||||
loadColor: headers => api(`${base}/editor-color`, { headers }),
|
||||
saveColor: (headers, color) => api(`${base}/editor-color`, { method: "POST", headers, body: JSON.stringify({ color }) }),
|
||||
fileEndpoints: {
|
||||
list: `${base}/files`,
|
||||
upload: `${base}/files`,
|
||||
@@ -53,6 +55,8 @@ export function createWorkspaceNoteAdapter() {
|
||||
addressSelector: "#note-url",
|
||||
title: info => `${info.title} · ${info.workspace_title}`,
|
||||
loadInfo: headers => api(base, { headers }),
|
||||
loadColor: headers => api(`${base}/editor-color`, { headers }),
|
||||
saveColor: (headers, color) => api(`${base}/editor-color`, { method: "POST", headers, body: JSON.stringify({ color }) }),
|
||||
fileEndpoints: {
|
||||
list: `${base}/files`,
|
||||
upload: `${base}/files`,
|
||||
|
||||
Reference in New Issue
Block a user