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:
src
@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user