@@ -31,7 +31,7 @@ GET /api/admin/storage/list
31
31
| per_page | query | string | 否 | 每页数目 |
32
32
| Authorization | header | string | 是 | token |
33
33
34
- > 返回示例
34
+ ### 返回示例
35
35
36
36
> 成功
37
37
@@ -61,7 +61,7 @@ GET /api/admin/storage/list
61
61
"down_proxy_url" : " "
62
62
}
63
63
],
64
- "total" : 5
64
+ "total" : 1
65
65
}
66
66
}
67
67
```
@@ -112,7 +112,7 @@ POST /api/admin/storage/enable
112
112
| id | query | integer | 是 | 存储id |
113
113
| Authorization | header | string | 是 | token |
114
114
115
- > 返回示例
115
+ ### 返回示例
116
116
117
117
> 成功
118
118
@@ -151,7 +151,7 @@ POST /api/admin/storage/disable
151
151
| id | query | string | 是 | 存储id |
152
152
| Authorization | header | string | 是 | token |
153
153
154
- > 返回示例
154
+ ### 返回示例
155
155
156
156
> 成功
157
157
@@ -179,7 +179,7 @@ POST /api/admin/storage/disable
179
179
| » message | string | true | none | 信息 | 信息 |
180
180
| » data | null | true | none | data | data |
181
181
182
- ## POST 更新存储
182
+ ## POST 创建存储
183
183
184
184
POST /api/admin/storage/create
185
185
@@ -205,22 +205,104 @@ POST /api/admin/storage/create
205
205
206
206
### 请求参数
207
207
208
- | 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
209
- | ------------------ | ------ | ------- | ---- | ------------ | ------------ |
210
- | Authorization | header | string | 是 | | token |
211
- | body | body | object | 否 | | none |
212
- | » mount_path | body | string | 是 | 挂载路径 | 挂载路径 |
213
- | » order | body | integer | 是 | 排序 | 排序 |
214
- | » remark | body | string | 是 | 备注名 | 备注名 |
215
- | » cache_expiration | body | integer | 是 | 缓存过期时间 | 缓存过期时间 |
216
- | » web_proxy | body | boolean | 是 | web代理 | web代理 |
217
- | » webdav_policy | body | string | 是 | webdav策略 | webdav策略 |
218
- | » down_proxy_url | body | string | 是 | 下载代理 | 下载代理 |
219
- | » extract_folder | body | string | 是 | 提取目录 | 提取目录 |
220
- | » driver | body | string | 是 | 驱动 | 驱动 |
221
- | » addition | body | string | 是 | 额外信息 | 额外信息 |
222
-
223
- > 返回示例
208
+ | 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
209
+ | ------------------ | ------ | ------- | ---- | ------------ | ----- |
210
+ | Authorization | header | string | 是 | | token |
211
+ | body | body | object | 否 | | none |
212
+ | » id | body | string | 否 | ID | none |
213
+ | » mount_path | body | string | 是 | 挂载路径 | none |
214
+ | » order | body | integer | 否 | 排序 | none |
215
+ | » driver | body | string | 是 | 驱动 | none |
216
+ | » remark | body | string | 否 | 备注名 | none |
217
+ | » cache_expiration | body | integer | 否 | 缓存过期时间 | none |
218
+ | » status | body | string | 是 | | none |
219
+ | » web_proxy | body | boolean | 是 | web代理 | none |
220
+ | » webdav_policy | body | string | 否 | webdav策略 | none |
221
+ | » down_proxy_url | body | string | 否 | 下载代理 | none |
222
+ | » order_by | body | string | 是 | 排序方式 | none |
223
+ | » extract_folder | body | string | 是 | 提取目录 | none |
224
+ | » order_direction | body | string | 是 | 排序方向 | none |
225
+ | » addition | body | string | 是 | 额外信息 | none |
226
+ | » enable_sign | body | string | 是 | 启用签名 | none |
227
+
228
+ ### 返回示例
229
+
230
+ > 成功
231
+
232
+ ``` json
233
+ {
234
+ "code" : 200 ,
235
+ "message" : " success" ,
236
+ "data" : {
237
+ "id" : 7
238
+ }
239
+ }
240
+ ```
241
+
242
+ ### 返回结果
243
+
244
+ | 状态码 | 状态码含义 | 说明 | 数据模型 |
245
+ | ------ | ------------------------------------------------------- | ---- | -------- |
246
+ | 200 | [ OK] ( https://tools.ietf.org/html/rfc7231#section-6.3.1 ) | 成功 | Inline |
247
+
248
+ ### 返回数据结构
249
+
250
+ 状态码 ** 200**
251
+
252
+ | 名称 | 类型 | 必选 | 约束 | 中文名 | 说明 |
253
+ | --------- | ------- | ---- | ---- | ------ | ------ |
254
+ | » code | integer | true | none | 状态码 | 状态码 |
255
+ | » message | string | true | none | 信息 | 信息 |
256
+ | » data | object | true | none | data | data |
257
+ | »» id | integer | true | none | | none |
258
+
259
+ ## POST 更新存储
260
+
261
+ POST /api/admin/storage/update
262
+
263
+ > Body 请求参数
264
+
265
+ ``` json
266
+ {
267
+ "mount_path" : " /lll" ,
268
+ "order" : 0 ,
269
+ "remark" : " " ,
270
+ "cache_expiration" : 30 ,
271
+ "web_proxy" : false ,
272
+ "webdav_policy" : " native_proxy" ,
273
+ "down_proxy_url" : " " ,
274
+ "extract_folder" : " front" ,
275
+ "enable_sign" : false ,
276
+ "driver" : " Local" ,
277
+ "order_by" : " name" ,
278
+ "order_direction" : " asc" ,
279
+ "addition" : " {\" root_folder_path\" :\" /\" ,\" thumbnail\" :false,\" thumb_cache_folder\" :\"\" ,\" show_hidden\" :true,\" mkdir_perm\" :\" 777\" }"
280
+ }
281
+ ```
282
+
283
+ ### 请求参数
284
+
285
+ | 名称 | 位置 | 类型 | 必选 | 中文名 | 说明 |
286
+ | ------------------ | ------ | ------- | ---- | ------------ | ----- |
287
+ | Authorization | header | string | 是 | | token |
288
+ | body | body | object | 否 | | none |
289
+ | » id | body | string | 否 | ID | none |
290
+ | » mount_path | body | string | 是 | 挂载路径 | none |
291
+ | » order | body | integer | 否 | 排序 | none |
292
+ | » driver | body | string | 是 | 驱动 | none |
293
+ | » remark | body | string | 否 | 备注名 | none |
294
+ | » cache_expiration | body | integer | 否 | 缓存过期时间 | none |
295
+ | » status | body | string | 是 | | none |
296
+ | » web_proxy | body | boolean | 是 | web代理 | none |
297
+ | » webdav_policy | body | string | 否 | webdav策略 | none |
298
+ | » down_proxy_url | body | string | 否 | 下载代理 | none |
299
+ | » order_by | body | string | 是 | 排序方式 | none |
300
+ | » extract_folder | body | string | 是 | 提取目录 | none |
301
+ | » order_direction | body | string | 是 | 排序方向 | none |
302
+ | » addition | body | string | 是 | 额外信息 | none |
303
+ | » enable_sign | body | string | 是 | 启用签名 | none |
304
+
305
+ ### 返回示例
224
306
225
307
> 成功
226
308
@@ -262,7 +344,7 @@ GET /api/admin/storage/get
262
344
| id | query | string | 是 | | 存储id |
263
345
| Authorization | header | string | 是 | | token |
264
346
265
- > 返回示例
347
+ ### 返回示例
266
348
267
349
> 成功
268
350
@@ -334,7 +416,7 @@ POST /api/admin/storage/delete
334
416
| id | query | string | 否 | | 存储id |
335
417
| Authorization | header | string | 是 | | token |
336
418
337
- > 返回示例
419
+ ### 返回示例
338
420
339
421
> 成功
340
422
@@ -372,7 +454,7 @@ POST /api/admin/storage/load_all
372
454
| ------------- | ------ | ------ | ---- | ------ | ---- |
373
455
| Authorization | header | string | 是 | | none |
374
456
375
- > 返回示例
457
+ ### 返回示例
376
458
377
459
> 成功
378
460
0 commit comments