Skip to content

Commit f15c7e8

Browse files
committed
Merge branch 'main' into pr/325
2 parents 87bf2be + 234c6f9 commit f15c7e8

11 files changed

Lines changed: 114 additions & 90 deletions

src/api/admin_user_api.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl AdminUser for AdminUserApi {
7171
Ok(Response::new(admin_user_paginate_response))
7272
}
7373
Err(e) => match e {
74-
Tonic(boxed_status) => Err(*boxed_status),
74+
Tonic(status) => Err(*status),
7575
_ => Err(Status::internal(e.to_string())),
7676
},
7777
}
@@ -116,7 +116,7 @@ impl AdminUser for AdminUserApi {
116116
Ok(response)
117117
}
118118
Err(e) => match e {
119-
Tonic(boxed_status) => Err(*boxed_status),
119+
Tonic(status) => Err(*status),
120120
_ => Err(Status::internal(e.to_string())),
121121
},
122122
}
@@ -154,7 +154,7 @@ impl AdminUser for AdminUserApi {
154154
Ok(res)
155155
}
156156
Err(e) => match e {
157-
Tonic(boxed_status) => Err(*boxed_status),
157+
Tonic(status) => Err(*status),
158158
_ => Err(Status::internal(e.to_string())),
159159
},
160160
}
@@ -194,7 +194,7 @@ impl AdminUser for AdminUserApi {
194194
Ok(res)
195195
}
196196
Err(e) => match e {
197-
Tonic(boxed_status) => Err(*boxed_status),
197+
Tonic(status) => Err(*status),
198198
_ => Err(Status::internal(e.to_string())),
199199
},
200200
}
@@ -229,7 +229,7 @@ impl AdminUser for AdminUserApi {
229229
Ok(res)
230230
}
231231
Err(e) => match e {
232-
Tonic(boxed_status) => Err(*boxed_status),
232+
Tonic(status) => Err(*status),
233233
_ => Err(Status::internal(e.to_string())),
234234
},
235235
}
@@ -262,7 +262,7 @@ impl AdminUser for AdminUserApi {
262262
Ok(res)
263263
}
264264
Err(e) => match e {
265-
Tonic(boxed_status) => Err(*boxed_status),
265+
Tonic(status) => Err(*status),
266266
_ => Err(Status::internal(e.to_string())),
267267
},
268268
}
@@ -305,7 +305,7 @@ impl AdminUser for AdminUserApi {
305305
Ok(res)
306306
}
307307
Err(e) => match e {
308-
Tonic(boxed_status) => Err(*boxed_status),
308+
Tonic(status) => Err(*status),
309309
_ => Err(Status::internal(e.to_string())),
310310
},
311311
}
@@ -335,7 +335,7 @@ impl AdminUser for AdminUserApi {
335335
Ok(res)
336336
}
337337
Err(e) => match e {
338-
Tonic(boxed_status) => Err(*boxed_status),
338+
Tonic(status) => Err(*status),
339339
_ => Err(Status::internal(e.to_string())),
340340
},
341341
}
@@ -371,7 +371,7 @@ impl AdminUser for AdminUserApi {
371371
Ok(res)
372372
}
373373
Err(e) => match e {
374-
Tonic(boxed_status) => Err(*boxed_status),
374+
Tonic(status) => Err(*status),
375375
_ => Err(Status::internal(e.to_string())),
376376
},
377377
}
@@ -410,7 +410,7 @@ impl AdminUser for AdminUserApi {
410410
Ok(res)
411411
}
412412
Err(e) => match e {
413-
Tonic(boxed_status) => Err(*boxed_status),
413+
Tonic(status) => Err(*status),
414414
_ => Err(Status::internal(e.to_string())),
415415
},
416416
}
@@ -446,7 +446,7 @@ impl AdminUser for AdminUserApi {
446446
Ok(res)
447447
}
448448
Err(e) => match e {
449-
Tonic(boxed_status) => Err(*boxed_status),
449+
Tonic(status) => Err(*status),
450450
_ => Err(Status::internal(e.to_string())),
451451
},
452452
}
@@ -485,7 +485,7 @@ impl AdminUser for AdminUserApi {
485485
Ok(res)
486486
}
487487
Err(e) => match e {
488-
Tonic(boxed_status) => Err(*boxed_status),
488+
Tonic(status) => Err(*status),
489489
_ => Err(Status::internal(e.to_string())),
490490
},
491491
}

src/api/asset_api.rs

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ impl Asset for AssetApi {
4040
Ok(res)
4141
}
4242
Err(e) => match e {
43-
Tonic(boxed_status) => Err(*boxed_status),
43+
Tonic(status) => Err(*status),
4444
_ => Err(Status::internal(e.to_string()))
4545
}
4646
}
@@ -75,7 +75,7 @@ impl Asset for AssetApi {
7575
Ok(res)
7676
}
7777
Err(e) => match e {
78-
Tonic(boxed_status) => Err(*boxed_status),
78+
Tonic(status) => Err(*status),
7979
_ => Err(Status::internal(e.to_string()))
8080
}
8181
}
@@ -109,9 +109,10 @@ impl Asset for AssetApi {
109109
Ok(res)
110110
}
111111
Err(e) => match e {
112-
Tonic(boxed_status) => Err(*boxed_status),
112+
Tonic(status) => Err(*status),
113113
_ => Err(Status::internal(e.to_string()))
114-
} }
114+
}
115+
}
115116
}
116117

117118
async fn delete_folder(
@@ -142,9 +143,10 @@ impl Asset for AssetApi {
142143
Ok(res)
143144
}
144145
Err(e) => match e {
145-
Tonic(boxed_status) => Err(*boxed_status),
146+
Tonic(status) => Err(*status),
146147
_ => Err(Status::internal(e.to_string()))
147-
} }
148+
}
149+
}
148150
}
149151

150152
async fn rename_asset(
@@ -176,8 +178,9 @@ impl Asset for AssetApi {
176178
Ok(res)
177179
}
178180
Err(e) => match e {
179-
Tonic(boxed_status) => Err(*boxed_status),
181+
Tonic(status) => Err(*status),
180182
_ => Err(Status::internal(e.to_string()))
181-
} }
183+
}
184+
}
182185
}
183186
}

src/api/auth_api.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ impl Auth for AuthApi {
4545
Ok(Response::new(login_response))
4646
}
4747
Err(e) => match e {
48-
Tonic(boxed_status) => Err(*boxed_status),
48+
Tonic(status) => Err(*status),
4949
_ => Err(Status::internal(e.to_string())),
5050
},
5151
}
@@ -81,7 +81,7 @@ impl Auth for AuthApi {
8181
Ok(Response::new(forgot_password_response))
8282
}
8383
Err(e) => match e {
84-
Tonic(boxed_status) => Err(*boxed_status),
84+
Tonic(status) => Err(*status),
8585
_ => Err(Status::internal(e.to_string())),
8686
},
8787
}
@@ -121,8 +121,8 @@ impl Auth for AuthApi {
121121

122122
Ok(res)
123123
}
124-
Err(e) => match e {
125-
Tonic(boxed_status) => Err(*boxed_status),
124+
Err(e) => match e {
125+
Tonic(status) => Err(*status),
126126
_ => Err(Status::internal(e.to_string())),
127127
},
128128
}

src/api/content_api.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ impl Content for ContentApi {
4747
Ok(res)
4848
}
4949
Err(e) => match e {
50-
Tonic(boxed_status) => Err(*boxed_status),
50+
Tonic(status) => Err(*status),
5151
_ => Err(Status::internal(e.to_string())),
5252
},
5353
}
@@ -81,7 +81,7 @@ impl Content for ContentApi {
8181
Ok(res)
8282
}
8383
Err(e) => match e {
84-
Tonic(boxed_status) => Err(*boxed_status),
84+
Tonic(status) => Err(*status),
8585
_ => Err(Status::internal(e.to_string())),
8686
},
8787
}
@@ -117,7 +117,7 @@ impl Content for ContentApi {
117117
Ok(res)
118118
}
119119
Err(e) => match e {
120-
Tonic(boxed_status) => Err(*boxed_status),
120+
Tonic(status) => Err(*status),
121121
_ => Err(Status::internal(e.to_string())),
122122
},
123123
}
@@ -151,7 +151,7 @@ impl Content for ContentApi {
151151
Ok(res)
152152
}
153153
Err(e) => match e {
154-
Tonic(boxed_status) => Err(*boxed_status),
154+
Tonic(status) => Err(*status),
155155
_ => Err(Status::internal(e.to_string())),
156156
},
157157
}
@@ -187,7 +187,7 @@ impl Content for ContentApi {
187187
Ok(res)
188188
}
189189
Err(e) => match e {
190-
Tonic(boxed_status) => Err(*boxed_status),
190+
Tonic(status) => Err(*status),
191191
_ => Err(Status::internal(e.to_string())),
192192
},
193193
}
@@ -226,7 +226,7 @@ impl Content for ContentApi {
226226
Ok(res)
227227
}
228228
Err(e) => match e {
229-
Tonic(boxed_status) => Err(*boxed_status),
229+
Tonic(status) => Err(*status),
230230
_ => Err(Status::internal(e.to_string())),
231231
},
232232
}
@@ -260,7 +260,7 @@ impl Content for ContentApi {
260260
Ok(res)
261261
}
262262
Err(e) => match e {
263-
Tonic(boxed_status) => Err(*boxed_status),
263+
Tonic(status) => Err(*status),
264264
_ => Err(Status::internal(e.to_string())),
265265
},
266266
}
@@ -295,7 +295,7 @@ impl Content for ContentApi {
295295
Ok(res)
296296
}
297297
Err(e) => match e {
298-
Tonic(boxed_status) => Err(*boxed_status),
298+
Tonic(status) => Err(*status),
299299
_ => Err(Status::internal(e.to_string())),
300300
},
301301
}
@@ -331,7 +331,7 @@ impl Content for ContentApi {
331331
Ok(res)
332332
}
333333
Err(e) => match e {
334-
Tonic(boxed_status) => Err(*boxed_status),
334+
Tonic(status) => Err(*status),
335335
_ => Err(Status::internal(e.to_string())),
336336
},
337337
}
@@ -367,7 +367,7 @@ impl Content for ContentApi {
367367
Ok(res)
368368
}
369369
Err(e) => match e {
370-
Tonic(boxed_status) => Err(*boxed_status),
370+
Tonic(status) => Err(*status),
371371
_ => Err(Status::internal(e.to_string())),
372372
},
373373
}

src/api/security_alert_api.rs

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl SecurityAlert for SecurityAlertApi {
5050
{
5151
Ok(reply) => Ok(Response::new(reply)),
5252
Err(e) => match e {
53-
Tonic(boxed_status) => Err(*boxed_status),
53+
Tonic(status) => Err(*status),
5454
_ => Err(Status::internal(e.to_string())),
5555
},
5656
}
@@ -75,7 +75,7 @@ impl SecurityAlert for SecurityAlertApi {
7575
{
7676
Ok(reply) => Ok(Response::new(reply)),
7777
Err(e) => match e {
78-
Tonic(boxed_status) => Err(*boxed_status),
78+
Tonic(status) => Err(*status),
7979
_ => Err(Status::internal(e.to_string())),
8080
},
8181
}
@@ -108,7 +108,7 @@ impl SecurityAlert for SecurityAlertApi {
108108
{
109109
Ok(reply) => Ok(Response::new(reply)),
110110
Err(e) => match e {
111-
Tonic(boxed_status) => Err(*boxed_status),
111+
Tonic(status) => Err(*status),
112112
_ => Err(Status::internal(e.to_string())),
113113
},
114114
}
@@ -146,7 +146,7 @@ impl SecurityAlert for SecurityAlertApi {
146146
{
147147
Ok(reply) => Ok(Response::new(reply)),
148148
Err(e) => match e {
149-
Tonic(boxed_status) => Err(*boxed_status),
149+
Tonic(status) => Err(*status),
150150
_ => Err(Status::internal(e.to_string())),
151151
},
152152
}
@@ -179,7 +179,7 @@ impl SecurityAlert for SecurityAlertApi {
179179
{
180180
Ok(reply) => Ok(Response::new(reply)),
181181
Err(e) => match e {
182-
Tonic(boxed_status) => Err(*boxed_status),
182+
Tonic(status) => Err(*status),
183183
_ => Err(Status::internal(e.to_string())),
184184
},
185185
}
@@ -212,7 +212,7 @@ impl SecurityAlert for SecurityAlertApi {
212212
{
213213
Ok(reply) => Ok(Response::new(reply)),
214214
Err(e) => match e {
215-
Tonic(boxed_status) => Err(*boxed_status),
215+
Tonic(status) => Err(*status),
216216
_ => Err(Status::internal(e.to_string())),
217217
},
218218
}
@@ -245,7 +245,7 @@ impl SecurityAlert for SecurityAlertApi {
245245
{
246246
Ok(reply) => Ok(Response::new(reply)),
247247
Err(e) => match e {
248-
Tonic(boxed_status) => Err(*boxed_status),
248+
Tonic(status) => Err(*status),
249249
_ => Err(Status::internal(e.to_string())),
250250
},
251251
}
@@ -278,7 +278,7 @@ impl SecurityAlert for SecurityAlertApi {
278278
{
279279
Ok(reply) => Ok(Response::new(reply)),
280280
Err(e) => match e {
281-
Tonic(boxed_status) => Err(*boxed_status),
281+
Tonic(status) => Err(*status),
282282
_ => Err(Status::internal(e.to_string())),
283283
},
284284
}
@@ -310,7 +310,7 @@ impl SecurityAlert for SecurityAlertApi {
310310
{
311311
Ok(reply) => Ok(Response::new(reply)),
312312
Err(e) => match e {
313-
Tonic(boxed_status) => Err(*boxed_status),
313+
Tonic(status) => Err(*status),
314314
_ => Err(Status::internal(e.to_string())),
315315
},
316316
}
@@ -343,7 +343,7 @@ impl SecurityAlert for SecurityAlertApi {
343343
{
344344
Ok(reply) => Ok(Response::new(reply)),
345345
Err(e) => match e {
346-
Tonic(boxed_status) => Err(*boxed_status),
346+
Tonic(status) => Err(*status),
347347
_ => Err(Status::internal(e.to_string())),
348348
},
349349
}
@@ -375,7 +375,7 @@ impl SecurityAlert for SecurityAlertApi {
375375
{
376376
Ok(reply) => Ok(Response::new(reply)),
377377
Err(e) => match e {
378-
Tonic(boxed_status) => Err(*boxed_status),
378+
Tonic(status) => Err(*status),
379379
_ => Err(Status::internal(e.to_string())),
380380
},
381381
}

0 commit comments

Comments
 (0)