mirror of
https://github.com/glimpse-app/server.git
synced 2025-04-02 10:52:45 -04:00
renamed block scope
This commit is contained in:
parent
fb74d955ac
commit
e8466d08a2
1 changed files with 2 additions and 2 deletions
|
@ -36,11 +36,11 @@ proc createUpdateRoutes*() =
|
||||||
except NotFoundError:
|
except NotFoundError:
|
||||||
resp Http404, "File does not exist.\n"
|
resp Http404, "File does not exist.\n"
|
||||||
|
|
||||||
block FileDoesNotExist:
|
block FileDoesNotExistCheck:
|
||||||
try:
|
try:
|
||||||
db.select(file, """"File".name = $1""", newName)
|
db.select(file, """"File".name = $1""", newName)
|
||||||
except NotFoundError:
|
except NotFoundError:
|
||||||
break FileDoesNotExist
|
break FileDoesNotExistCheck
|
||||||
resp Http403, "File with that name already exists.\n"
|
resp Http403, "File with that name already exists.\n"
|
||||||
|
|
||||||
let newPath = file.path[0..^file.name.len+1] & newName
|
let newPath = file.path[0..^file.name.len+1] & newName
|
||||||
|
|
Loading…
Add table
Reference in a new issue