Skip to content

Commit 5c68156

Browse files
authored
Fix swagger identity routes (#397)
1 parent 35a2812 commit 5c68156

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/web/handlers/identity.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub async fn upload_file(
6868

6969
#[utoipa::path(
7070
tag = "Identity",
71-
path = "/identity/detail",
71+
path = "/api/identity/detail",
7272
description = "Returns the current identity",
7373
responses(
7474
(status = 200, description = "The current identity data", body = IdentityToReturn)
@@ -87,7 +87,7 @@ pub async fn return_identity(state: &State<ServiceContext>) -> Result<Json<Ident
8787

8888
#[utoipa::path(
8989
tag = "Identity",
90-
path = "/identity/create",
90+
path = "/api/identity/create",
9191
description = "Creates a new identity with given data",
9292
responses(
9393
(status = 200, description = "The identity has been created")
@@ -125,7 +125,7 @@ pub async fn create_identity(
125125

126126
#[utoipa::path(
127127
tag = "Identity",
128-
path = "/identity/change",
128+
path = "/api/identity/change",
129129
description = "Updates the identity with given data",
130130
responses(
131131
(status = 200, description = "The identity has been updated")
@@ -172,7 +172,7 @@ pub async fn change_identity(
172172

173173
#[utoipa::path(
174174
tag = "Identity",
175-
path = "/identity/active",
175+
path = "/api/identity/active",
176176
description = "Returns the currently active identity data",
177177
responses(
178178
(status = 200, description = "The identity that is currently active", body = SwitchIdentity)
@@ -193,7 +193,7 @@ pub async fn active(state: &State<ServiceContext>) -> Result<Json<SwitchIdentity
193193

194194
#[utoipa::path(
195195
tag = "Identity",
196-
path = "/identity/switch",
196+
path = "/api/identity/switch",
197197
description = "Switches the currently active identity to the given identity",
198198
responses(
199199
(status = 200, description = "The active identity has been switched")
@@ -234,7 +234,7 @@ pub async fn switch(
234234

235235
#[utoipa::path(
236236
tag = "Identity",
237-
path = "/identity/seed/backup",
237+
path = "/api/identity/seed/backup",
238238
description = "Returns the seed phrase key backup of current private key",
239239
responses(
240240
(status = 200, description = "The seed phrase of the current private key", body = SeedPhrase)
@@ -248,7 +248,7 @@ pub async fn get_seed_phrase(state: &State<ServiceContext>) -> Result<Json<SeedP
248248

249249
#[utoipa::path(
250250
tag = "Identity",
251-
path = "/identity/seed/recover",
251+
path = "/api/identity/seed/recover",
252252
description = "Restores a private key from the given seed phrase backup",
253253
responses(
254254
(status = 200, description = "Private key has been recovered from seed")
@@ -269,7 +269,7 @@ pub async fn recover_from_seed_phrase(
269269

270270
#[utoipa::path(
271271
tag = "Identity",
272-
path = "/identity/backup",
272+
path = "/api/identity/backup",
273273
description = "Creates an encrypted backup of all the data for current identity and returns the backup file",
274274
responses(
275275
(status = 200, description = "The encrypted backup that has been created")
@@ -288,7 +288,7 @@ pub async fn backup_identity(state: &State<ServiceContext>) -> Result<BinaryFile
288288
#[utoipa::path(
289289
post,
290290
tag = "Identity",
291-
path = "/identity/restore",
291+
path = "/api/identity/restore",
292292
request_body(content_type = "multipart/form-data", content = UploadFileForm, description = "Backup file to upload"),
293293
responses(
294294
(status = 200, description = "Indentity has been restored")

0 commit comments

Comments
 (0)