feat: pin/unpin memo

This commit is contained in:
boojack
2022-05-02 10:57:20 +08:00
parent fcb5e2ee5a
commit 995ec34bf8
15 changed files with 101 additions and 44 deletions

View File

@ -113,7 +113,7 @@ namespace api {
export function getMyMemos() {
return request<Model.Memo[]>({
method: "GET",
url: "/api/memo?rowStatus=NORMAL",
url: "/api/memo",
});
}
@ -144,6 +144,26 @@ namespace api {
});
}
export function pinMemo(memoId: string) {
return request({
method: "PATCH",
url: `/api/memo/${memoId}`,
data: {
rowStatus: "ARCHIVED",
},
});
}
export function unpinMemo(shortcutId: string) {
return request({
method: "PATCH",
url: `/api/memo/${shortcutId}`,
data: {
rowStatus: "NORMAL",
},
});
}
export function hideMemo(memoId: string) {
return request({
method: "PATCH",