🐛 Fix put request

This commit is contained in:
Edgar 2022-10-11 15:43:39 +02:00
parent b9cda51c0f
commit 81786f6b27
No known key found for this signature in database
GPG Key ID: 17D930BB616061A5

View File

@ -35,7 +35,7 @@ pub fn (mut app App) kv_get(key string) vweb.Result {
return app.not_found() return app.not_found()
} }
['/set/:key'; post] ['/set/:key'; put]
fn (mut app App) kv_set(key string) vweb.Result { fn (mut app App) kv_set(key string) vweb.Result {
lock app.state { lock app.state {
app.state.kv_store[key] = app.req.data app.state.kv_store[key] = app.req.data