All checks were successful
CI Monitor MIflow / build-image (push) Successful in 45s
17 lines
422 B
TypeScript
17 lines
422 B
TypeScript
import { DB } from "../../types/db"
|
|
import pbClient from "../pbClient"
|
|
|
|
/**
|
|
* 创建一个新的通知。
|
|
* @param {Partial<DB.Notify>} data - 新通知的数据。
|
|
* @returns {Promise<DB.Notify>} - 返回解析为已创建通知对象的promise。
|
|
*/
|
|
const create = async (data: Partial<DB.Notify>) =>
|
|
await pbClient.collection("notify").create<DB.Notify>(data)
|
|
|
|
const notify = {
|
|
create,
|
|
}
|
|
|
|
export default notify
|