message push config

This commit is contained in:
yoan
2024-09-23 23:13:34 +08:00
parent 5422f17fab
commit 4c9095400e
13 changed files with 727 additions and 60 deletions

View File

@@ -14,6 +14,20 @@ export const getEmails = async () => {
}
};
export const getSetting = async (name: string) => {
try {
const resp = await getPb()
.collection("settings")
.getFirstListItem<Setting>(`name='${name}'`);
return resp;
} catch (e) {
const rs: Setting = {
name: name,
};
return rs;
}
};
export const update = async (setting: Setting) => {
const pb = getPb();
let resp: Setting;