mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
nimpretty
This commit is contained in:
parent
58596be4ac
commit
759bb75328
2 changed files with 3 additions and 2 deletions
|
@ -17,7 +17,8 @@ proc createAuthenticationRoutes*() =
|
|||
]#
|
||||
post "/api/v1/newUser":
|
||||
# TODO: sanitization + check if username and email are unique
|
||||
if @"username".isEmptyOrWhitespace() or @"email".isEmptyOrWhitespace() or @"password".isEmptyOrWhitespace():
|
||||
if @"username".isEmptyOrWhitespace() or @"email".isEmptyOrWhitespace() or
|
||||
@"password".isEmptyOrWhitespace():
|
||||
resp Http403, "Not all required parameters are provided.\n"
|
||||
|
||||
var user = newUser(@"username", @"email", @"password")
|
||||
|
|
|
@ -8,7 +8,7 @@ type File* = ref object of Model
|
|||
name*: string
|
||||
tags*: string #? This is a temporary hack should be `seq[string]` or `JsonNode` instead
|
||||
|
||||
# creates a new file object and sets default values, recommended by the norm documentation
|
||||
# creates a new file object and sets default values, recommended by the norm documentation
|
||||
func newFile*(user: User = newUser(), path: string = "", name: string = "",
|
||||
tags: string = ""): File =
|
||||
File(owner: user, path: path, name: name, tags: tags)
|
||||
|
|
Loading…
Add table
Reference in a new issue