(
domainId: string, docType: T, docId: DocType[T]['docId'],
setKey: K, content: string,
)
| 266 | } |
| 267 | |
| 268 | export async function addToSet<T extends keyof DocType, K extends ArrayKeys<DocType[T], string>>( |
| 269 | domainId: string, docType: T, docId: DocType[T]['docId'], |
| 270 | setKey: K, content: string, |
| 271 | ) { |
| 272 | return await coll.findOneAndUpdate( |
| 273 | { domainId, docType, docId }, |
| 274 | // @ts-ignore |
| 275 | { $addToSet: { [setKey]: content } }, |
| 276 | { returnDocument: 'after' }, |
| 277 | ); |
| 278 | } |
| 279 | |
| 280 | export async function getStatus<K extends keyof DocStatusType>( |
| 281 | domainId: string, docType: K, docId: DocStatusType[K]['docId'], uid: number, |
nothing calls this directly
no outgoing calls
no test coverage detected