1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2025-07-15 14:18:04 +00:00

Can update post content

This commit is contained in:
2020-03-20 18:41:32 +01:00
parent 9f22f2df56
commit 627600685d
4 changed files with 42 additions and 1 deletions

@ -460,6 +460,24 @@ export class PostsHelper {
})
}
/**
* Set new content to the post
*
* @param postID Target post ID
* @param content Target content
*/
public static async SetContent(postID: number, content: string) {
await DatabaseHelper.UpdateRows({
table: TABLE_NAME,
where: {
ID: postID
},
set: {
texte: content
}
})
}
/**
* Turn a database entry into a row object
*