mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2025-09-18 21:28:47 +00:00
Can create text posts
This commit is contained in:
@@ -85,9 +85,10 @@ export class RequestHandler {
|
||||
* Get some content for post and satinize it (remove HTML nodes)
|
||||
*
|
||||
* @param name The name of the POST field
|
||||
* @param minLength Optionnal minimal length for the post
|
||||
*/
|
||||
public postContent(name: string) : string {
|
||||
const content = this.postString(name);
|
||||
public postContent(name: string, minLength ?: number) : string {
|
||||
const content = this.postString(name, minLength);
|
||||
|
||||
if(content.match(/data:image/))
|
||||
this.error(401, "Please do not include inline images!");
|
||||
|
Reference in New Issue
Block a user