add notify user
This commit is contained in:
@@ -29,6 +29,13 @@ async function markInternalRead(id: string): Promise<void> {
|
||||
});
|
||||
}
|
||||
|
||||
/** 删除当前用户的一条站内通知。 */
|
||||
async function deleteInternal(id: string): Promise<void> {
|
||||
await axios.post(`${BASE_URI}/delete`, undefined, {
|
||||
params: { id }
|
||||
});
|
||||
}
|
||||
|
||||
/** 标记当前用户全部站内通知已读。 */
|
||||
async function markAllInternalRead(): Promise<void> {
|
||||
await axios.post(`${BASE_URI}/read/all`);
|
||||
@@ -39,5 +46,6 @@ export default {
|
||||
listInternal,
|
||||
countUnreadInternal,
|
||||
markInternalRead,
|
||||
deleteInternal,
|
||||
markAllInternalRead
|
||||
};
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { Model } from "./Model";
|
||||
import type { User } from "./User";
|
||||
|
||||
/** 通知消息类型 */
|
||||
export type NotifyMsgType = "INTERNAL" | "SMS" | "MAIL" | "HTTP" | "WECHAT";
|
||||
@@ -54,4 +55,8 @@ export type NotifyDetail = {
|
||||
readAt?: number;
|
||||
/** 所属通知 */
|
||||
notify?: Notify;
|
||||
/** 发送用户 */
|
||||
fromUser?: User;
|
||||
/** 接收用户 */
|
||||
toUser?: User;
|
||||
} & Model;
|
||||
|
||||
Reference in New Issue
Block a user