mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-26 02:30:18 +08:00
✨ Feature: update piclist core
This commit is contained in:
@@ -21,16 +21,13 @@ export default class ImgurApi {
|
||||
private static async makeRequest (
|
||||
method: 'delete',
|
||||
url: string,
|
||||
config: IConfig,
|
||||
logError: boolean = true
|
||||
config: IConfig
|
||||
): Promise<boolean> {
|
||||
try {
|
||||
const response: AxiosResponse = await axios[method](url, config)
|
||||
return response.status === 200
|
||||
} catch (error) {
|
||||
if (logError) {
|
||||
console.error(error)
|
||||
}
|
||||
console.error(error)
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user