🐛 Fix: add local path picbed into delete api of http server

This commit is contained in:
萌萌哒赫萝
2023-08-10 05:30:46 -07:00
parent 517348886c
commit f585bb4d7d
19 changed files with 228 additions and 262 deletions

View File

@@ -11,6 +11,7 @@ import axios from 'axios'
class Server {
private httpServer: http.Server
private config: IServerConfig
constructor () {
let config = picgo.getConfig<IServerConfig>('settings.server')
const result = this.checkIfConfigIsValid(config)
@@ -31,11 +32,7 @@ class Server {
}
private checkIfConfigIsValid (config: IObj | undefined) {
if (config && config.port && config.host && (config.enable !== undefined)) {
return true
} else {
return false
}
return config && config.port && config.host && (config.enable !== undefined)
}
private handleRequest = (request: http.IncomingMessage, response: http.ServerResponse) => {