Fixes post deletion for users.
This commit is contained in:
parent
0e30f4f625
commit
6e207327a5
1 changed files with 1 additions and 1 deletions
|
|
@ -679,7 +679,7 @@ proc executeDeletePost(c: TForumData, postId: int) =
|
|||
select p.id from post p
|
||||
where p.author = ? and p.id = ?
|
||||
"""
|
||||
let id = getValue(db, postQuery, postId, c.username)
|
||||
let id = getValue(db, postQuery, c.username, postId)
|
||||
|
||||
if id.len == 0 and c.rank < Admin:
|
||||
raise newForumError("You cannot delete this post")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue