Skip to content

Commit

Permalink
examples: minor refactor in the xvweb example (#20206)
Browse files Browse the repository at this point in the history
  • Loading branch information
Delta456 committed Dec 17, 2023
1 parent b44fb15 commit 25c900f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/xvweb/todo/main.v
Expand Up @@ -113,7 +113,7 @@ pub fn (app &App) delete_todo(mut ctx Context, id int) vweb.Result {

// prevent hackers from deleting TODO's that are not completed ;)
to_be_deleted := todos[0]
if to_be_deleted.completed == false {
if !to_be_deleted.completed {
return ctx.request_error('You must first complete a TODO before you can delete it!')
}

Expand Down

0 comments on commit 25c900f

Please sign in to comment.