Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] db_user_add 405 Method Not Allowed #1183 #1184

Merged
merged 4 commits into from
Aug 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions agdb_api/php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,14 @@ Class | Method | HTTP request | Description
*RoutesdbApi* | [**dbBackup**](docs/Api/RoutesdbApi.md#dbbackup) | **POST** /api/v1/db/{owner}/{db}/backup |
*RoutesdbApi* | [**dbClear**](docs/Api/RoutesdbApi.md#dbclear) | **POST** /api/v1/db/{owner}/{db}/clear |
*RoutesdbApi* | [**dbCopy**](docs/Api/RoutesdbApi.md#dbcopy) | **POST** /api/v1/db/{owner}/{db}/copy |
*RoutesdbApi* | [**dbDelete**](docs/Api/RoutesdbApi.md#dbdelete) | **POST** /api/v1/db/{owner}/{db}/delete |
*RoutesdbApi* | [**dbDelete**](docs/Api/RoutesdbApi.md#dbdelete) | **DELETE** /api/v1/db/{owner}/{db}/delete |
*RoutesdbApi* | [**dbExec**](docs/Api/RoutesdbApi.md#dbexec) | **POST** /api/v1/db/{owner}/{db}/exec |
*RoutesdbApi* | [**dbList**](docs/Api/RoutesdbApi.md#dblist) | **GET** /api/v1/db/list |
*RoutesdbApi* | [**dbOptimize**](docs/Api/RoutesdbApi.md#dboptimize) | **POST** /api/v1/db/{owner}/{db}/optimize |
*RoutesdbApi* | [**dbRemove**](docs/Api/RoutesdbApi.md#dbremove) | **POST** /api/v1/db/{owner}/{db}/remove |
*RoutesdbApi* | [**dbRemove**](docs/Api/RoutesdbApi.md#dbremove) | **DELETE** /api/v1/db/{owner}/{db}/remove |
*RoutesdbApi* | [**dbRename**](docs/Api/RoutesdbApi.md#dbrename) | **POST** /api/v1/db/{owner}/{db}/rename |
*RoutesdbApi* | [**dbRestore**](docs/Api/RoutesdbApi.md#dbrestore) | **POST** /api/v1/db/{owner}/{db}/restore |
*RoutesdbuserApi* | [**dbUserAdd**](docs/Api/RoutesdbuserApi.md#dbuseradd) | **POST** /api/v1/db/{owner}/{db}/user/{username}/add |
*RoutesdbuserApi* | [**dbUserAdd**](docs/Api/RoutesdbuserApi.md#dbuseradd) | **PUT** /api/v1/db/{owner}/{db}/user/{username}/add |
*RoutesdbuserApi* | [**dbUserList**](docs/Api/RoutesdbuserApi.md#dbuserlist) | **GET** /api/v1/db/{owner}/{db}/user/list |
*RoutesdbuserApi* | [**dbUserRemove**](docs/Api/RoutesdbuserApi.md#dbuserremove) | **POST** /api/v1/db/{owner}/{db}/user/{username}/remove |
*RoutesuserApi* | [**userChangePassword**](docs/Api/RoutesuserApi.md#userchangepassword) | **PUT** /api/v1/user/change_password |
Expand Down
4 changes: 2 additions & 2 deletions agdb_api/php/docs/Api/RoutesdbApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ All URIs are relative to http://localhost:3000, except if the operation defines
| [**dbBackup()**](RoutesdbApi.md#dbBackup) | **POST** /api/v1/db/{owner}/{db}/backup | |
| [**dbClear()**](RoutesdbApi.md#dbClear) | **POST** /api/v1/db/{owner}/{db}/clear | |
| [**dbCopy()**](RoutesdbApi.md#dbCopy) | **POST** /api/v1/db/{owner}/{db}/copy | |
| [**dbDelete()**](RoutesdbApi.md#dbDelete) | **POST** /api/v1/db/{owner}/{db}/delete | |
| [**dbDelete()**](RoutesdbApi.md#dbDelete) | **DELETE** /api/v1/db/{owner}/{db}/delete | |
| [**dbExec()**](RoutesdbApi.md#dbExec) | **POST** /api/v1/db/{owner}/{db}/exec | |
| [**dbList()**](RoutesdbApi.md#dbList) | **GET** /api/v1/db/list | |
| [**dbOptimize()**](RoutesdbApi.md#dbOptimize) | **POST** /api/v1/db/{owner}/{db}/optimize | |
| [**dbRemove()**](RoutesdbApi.md#dbRemove) | **POST** /api/v1/db/{owner}/{db}/remove | |
| [**dbRemove()**](RoutesdbApi.md#dbRemove) | **DELETE** /api/v1/db/{owner}/{db}/remove | |
| [**dbRename()**](RoutesdbApi.md#dbRename) | **POST** /api/v1/db/{owner}/{db}/rename | |
| [**dbRestore()**](RoutesdbApi.md#dbRestore) | **POST** /api/v1/db/{owner}/{db}/restore | |

Expand Down
2 changes: 1 addition & 1 deletion agdb_api/php/docs/Api/RoutesdbuserApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All URIs are relative to http://localhost:3000, except if the operation defines

| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**dbUserAdd()**](RoutesdbuserApi.md#dbUserAdd) | **POST** /api/v1/db/{owner}/{db}/user/{username}/add | |
| [**dbUserAdd()**](RoutesdbuserApi.md#dbUserAdd) | **PUT** /api/v1/db/{owner}/{db}/user/{username}/add | |
| [**dbUserList()**](RoutesdbuserApi.md#dbUserList) | **GET** /api/v1/db/{owner}/{db}/user/list | |
| [**dbUserRemove()**](RoutesdbuserApi.md#dbUserRemove) | **POST** /api/v1/db/{owner}/{db}/user/{username}/remove | |

Expand Down
4 changes: 2 additions & 2 deletions agdb_api/php/lib/Api/RoutesdbApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -1837,7 +1837,7 @@ public function dbDeleteRequest($owner, $db, string $contentType = self::content
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
Expand Down Expand Up @@ -3030,7 +3030,7 @@ public function dbRemoveRequest($owner, $db, string $contentType = self::content
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
'DELETE',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
Expand Down
2 changes: 1 addition & 1 deletion agdb_api/php/lib/Api/RoutesdbuserApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ public function dbUserAddRequest($owner, $db, $username, $db_role, string $conte
$operationHost = $this->config->getHost();
$query = ObjectSerializer::buildQuery($queryParams);
return new Request(
'POST',
'PUT',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
Expand Down
6 changes: 3 additions & 3 deletions agdb_api/typescript/src/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2513,7 +2513,7 @@ export interface PathsDictionary {
/**
* db_delete
*/
'post'(
'delete'(
parameters?: Parameters<Paths.DbDelete.PathParameters> | null,
data?: any,
config?: AxiosRequestConfig
Expand Down Expand Up @@ -2543,7 +2543,7 @@ export interface PathsDictionary {
/**
* db_remove
*/
'post'(
'delete'(
parameters?: Parameters<Paths.DbRemove.PathParameters> | null,
data?: any,
config?: AxiosRequestConfig
Expand Down Expand Up @@ -2583,7 +2583,7 @@ export interface PathsDictionary {
/**
* db_user_add
*/
'post'(
'put'(
parameters?: Parameters<Paths.DbUserAdd.QueryParameters & Paths.DbUserAdd.PathParameters> | null,
data?: any,
config?: AxiosRequestConfig
Expand Down
6 changes: 3 additions & 3 deletions agdb_server/openapi/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,7 @@
}
},
"/api/v1/db/{owner}/{db}/delete": {
"post": {
"delete": {
"tags": [
"routes::db"
],
Expand Down Expand Up @@ -1399,7 +1399,7 @@
}
},
"/api/v1/db/{owner}/{db}/remove": {
"post": {
"delete": {
"tags": [
"routes::db"
],
Expand Down Expand Up @@ -1598,7 +1598,7 @@
}
},
"/api/v1/db/{owner}/{db}/user/{username}/add": {
"post": {
"put": {
"tags": [
"routes::db::user"
],
Expand Down
4 changes: 2 additions & 2 deletions agdb_server/src/routes/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ pub(crate) async fn copy(
Ok(StatusCode::CREATED)
}

#[utoipa::path(post,
#[utoipa::path(delete,
path = "/api/v1/db/{owner}/{db}/delete",
operation_id = "db_delete",
security(("Token" = [])),
Expand Down Expand Up @@ -287,7 +287,7 @@ pub(crate) async fn optimize(
Ok((StatusCode::OK, Json(db)))
}

#[utoipa::path(post,
#[utoipa::path(delete,
path = "/api/v1/db/{owner}/{db}/remove",
operation_id = "db_remove",
security(("Token" = [])),
Expand Down
2 changes: 1 addition & 1 deletion agdb_server/src/routes/db/user.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pub(crate) struct DbUserRoleParam {
pub(crate) db_role: DbUserRole,
}

#[utoipa::path(post,
#[utoipa::path(put,
path = "/api/v1/db/{owner}/{db}/user/{username}/add",
operation_id = "db_user_add",
security(("Token" = [])),
Expand Down