(url, data = {}, options = {}, requiresAuth = true, responseType = 'json')
| 203 | * @returns {Promise} - 请求结果 |
| 204 | */ |
| 205 | export function apiPut(url, data = {}, options = {}, requiresAuth = true, responseType = 'json') { |
| 206 | return apiRequest( |
| 207 | url, |
| 208 | { |
| 209 | method: 'PUT', |
| 210 | body: data instanceof FormData ? data : JSON.stringify(data), |
| 211 | ...options |
| 212 | }, |
| 213 | requiresAuth, |
| 214 | responseType |
| 215 | ) |
| 216 | } |
| 217 | |
| 218 | export function apiAdminPut(url, data = {}, options = {}, responseType = 'json') { |
| 219 | checkAdminPermission() |
no test coverage detected