backend: add type annotations to delete.ts

This commit is contained in:
Norm 2022-10-16 17:14:30 -04:00
parent 70eec26b74
commit f17485d8a2
Signed by untrusted user: norm
GPG key ID: 7123E30E441E80DE

View file

@ -86,7 +86,7 @@ export default async function(user: { id: User['id']; uri: User['uri']; host: Us
async function findCascadingNotes(note: Note): Promise<Note[]> {
const cascadingNotes: Note[] = [];
const recursive = async (noteId: string) => {
const recursive = async (noteId: string): Promise<void> => {
const query = Notes.createQueryBuilder('note')
.where('note.replyId = :noteId', { noteId })
.orWhere(new Brackets(q => {
@ -131,7 +131,7 @@ async function getMentionedRemoteUsers(note: Note): Promise<IRemoteUser[]> {
}) as IRemoteUser[];
}
async function deliverToConcerned(user: { id: ILocalUser['id']; host: null; }, note: Note, content: any) {
async function deliverToConcerned(user: { id: ILocalUser['id']; host: null; }, note: Note, content: any): Promise<void> {
const manager = new DeliverManager(user, content);
const remoteUsers = await getMentionedRemoteUsers(note);