feat: add auth to swagerr add middleware for check admin
This commit is contained in:
@@ -122,6 +122,11 @@
|
||||
}
|
||||
},
|
||||
"post": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Create new post",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -234,6 +239,11 @@
|
||||
}
|
||||
},
|
||||
"put": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Update post",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -297,6 +307,11 @@
|
||||
}
|
||||
},
|
||||
"delete": {
|
||||
"security": [
|
||||
{
|
||||
"Bearer": []
|
||||
}
|
||||
],
|
||||
"description": "Delete post",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
@@ -429,5 +444,13 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"securityDefinitions": {
|
||||
"Bearer": {
|
||||
"description": "Type \"Bearer\" followed by a space and the JWT token.",
|
||||
"type": "apiKey",
|
||||
"name": "Authorization",
|
||||
"in": "header"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user