a mini social media app for small communities

fix api_user_get_name

Changed files
+3 -1
src
webapp
+3 -1
src/webapp/api.v
··· 382 382 @['/api/user/get_name'; get] 383 383 fn (mut app App) api_user_get_name(mut ctx Context, username string) veb.Result { 384 384 if !app.config.instance.public_data { 385 - return ctx.server_error('no such error') 385 + _ := app.whoami(mut ctx) or { 386 + return ctx.unauthorized('no such user') 387 + } 386 388 } 387 389 user := app.get_user_by_name(username) or { return ctx.server_error('no such user') } 388 390 return ctx.text(user.get_name())