feat: authentication system
This commit is contained in:
parent
d8c29e1ec8
commit
37153c6e36
15 changed files with 852 additions and 18 deletions
|
|
@ -20,6 +20,7 @@ struct BookByIdParams(u32);
|
|||
get,
|
||||
path = "/book/id/{id}",
|
||||
params(BookByIdParams),
|
||||
security(("jwt" = [])),
|
||||
responses(
|
||||
(status = OK, body = book::Model, description = "Found book with corresponding ID in the database", examples(
|
||||
("Found regular book" = (value = json!({"author": "Pierre Bottero", "ean": "9782700234015", "id": 5642, "title": "Ellana l'envol"}))),
|
||||
|
|
@ -52,6 +53,7 @@ struct BookByEanParams(String);
|
|||
get,
|
||||
path = "/book/ean/{ean}",
|
||||
params(BookByEanParams),
|
||||
security(("jwt" = [])),
|
||||
responses(
|
||||
(status = OK, body = book::Model, description = "Found book with corresponding EAN", examples(
|
||||
("Found regular book" = (value = json!({"author": "Pierre Bottero", "ean": "9782700234015", "id": 5642, "title": "Ellana l'envol"})))
|
||||
|
|
|
|||
Reference in a new issue