badmfck-api-server 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -127,11 +127,11 @@ class Monitor extends BaseEndpoint_1.BaseEndpoint {
|
|
127
127
|
};
|
128
128
|
}
|
129
129
|
async controllers(req) {
|
130
|
-
this.checkAuthentication(req);
|
130
|
+
await this.checkAuthentication(req);
|
131
131
|
return {};
|
132
132
|
}
|
133
133
|
async changeLogLevel(req) {
|
134
|
-
this.checkAuthentication(req);
|
134
|
+
await this.checkAuthentication(req);
|
135
135
|
const val = logMap[req.data.level];
|
136
136
|
if (!val)
|
137
137
|
throw { ...DefaultErrors_1.default.BAD_REQUEST, details: "bad log level" };
|
@@ -139,7 +139,7 @@ class Monitor extends BaseEndpoint_1.BaseEndpoint {
|
|
139
139
|
return { data: (await LogService_1.REQ_CURRENT_LOG_LEVEL.request()) };
|
140
140
|
}
|
141
141
|
async logs(req) {
|
142
|
-
this.checkAuthentication(req);
|
142
|
+
await this.checkAuthentication(req);
|
143
143
|
const services = await LogService_1.REQ_LOG_UNIQUE_SERVICES.request();
|
144
144
|
const log = await LogService_1.REQ_LOG.request({
|
145
145
|
lastID: req.data.lastID ?? 0
|
@@ -152,17 +152,17 @@ class Monitor extends BaseEndpoint_1.BaseEndpoint {
|
|
152
152
|
};
|
153
153
|
}
|
154
154
|
async netlog(req) {
|
155
|
-
this.checkAuthentication(req);
|
155
|
+
await this.checkAuthentication(req);
|
156
156
|
const log = await APIService_1.REQ_HTTP_LOG.request(req.data);
|
157
157
|
return { data: log };
|
158
158
|
}
|
159
159
|
async metrics(req) {
|
160
|
-
this.checkAuthentication(req);
|
160
|
+
await this.checkAuthentication(req);
|
161
161
|
const result = await MonitorService_1.REQ_EP_STAT.request(req.data);
|
162
162
|
return { data: result };
|
163
163
|
}
|
164
164
|
async serverStat(req) {
|
165
|
-
this.checkAuthentication(req);
|
165
|
+
await this.checkAuthentication(req);
|
166
166
|
let stat = {
|
167
167
|
cpuUsage: os_1.default.cpus(),
|
168
168
|
memoryTotal: os_1.default.totalmem(),
|