@@ -31,7 +31,7 @@ GET /api/admin/storage/list
3131| per_page | query | string | 否 | 每页数目 |
3232| Authorization | header | string | 是 | token |
3333
34- > 返回示例
34+ ### 返回示例
3535
3636> 成功
3737
@@ -61,7 +61,7 @@ GET /api/admin/storage/list
6161 "down_proxy_url" : " "
6262 }
6363 ],
64- "total" : 5
64+ "total" : 1
6565 }
6666}
6767```
@@ -112,7 +112,7 @@ POST /api/admin/storage/enable
112112| id | query | integer | 是 | 存储id |
113113| Authorization | header | string | 是 | token |
114114
115- > 返回示例
115+ ### 返回示例
116116
117117> 成功
118118
@@ -151,7 +151,7 @@ POST /api/admin/storage/disable
151151| id | query | string | 是 | 存储id |
152152| Authorization | header | string | 是 | token |
153153
154- > 返回示例
154+ ### 返回示例
155155
156156> 成功
157157
@@ -179,7 +179,7 @@ POST /api/admin/storage/disable
179179| » message | string | true | none | 信息 | 信息 |
180180| » data | null | true | none | data | data |
181181
182- ## POST 更新存储
182+ ## POST 创建存储
183183
184184POST /api/admin/storage/create
185185
@@ -205,22 +205,104 @@ POST /api/admin/storage/create
205205
206206### 请求参数
207207
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+ ### 返回示例
224306
225307> 成功
226308
@@ -262,7 +344,7 @@ GET /api/admin/storage/get
262344| id | query | string | 是 | | 存储id |
263345| Authorization | header | string | 是 | | token |
264346
265- > 返回示例
347+ ### 返回示例
266348
267349> 成功
268350
@@ -334,7 +416,7 @@ POST /api/admin/storage/delete
334416| id | query | string | 否 | | 存储id |
335417| Authorization | header | string | 是 | | token |
336418
337- > 返回示例
419+ ### 返回示例
338420
339421> 成功
340422
@@ -372,7 +454,7 @@ POST /api/admin/storage/load_all
372454| ------------- | ------ | ------ | ---- | ------ | ---- |
373455| Authorization | header | string | 是 | | none |
374456
375- > 返回示例
457+ ### 返回示例
376458
377459> 成功
378460
0 commit comments