...
This commit is contained in:
parent
d7685f56a3
commit
d2bc7d5dd4
@ -1,5 +1,8 @@
|
||||
const crypt = require("../crypt");
|
||||
|
||||
// methods
|
||||
const isAuthed = require("./is-authed");
|
||||
|
||||
function parseRq (bytes) {
|
||||
try {
|
||||
return JSON.parse(bytes.toString());
|
||||
@ -18,7 +21,7 @@ class APIMethods {
|
||||
}
|
||||
|
||||
authed (con, req, cb) {
|
||||
cb({ result: require("./server-info"), trace_id: req.trace_id, ended: true });
|
||||
isAuthed(con, req, cb);
|
||||
}
|
||||
|
||||
/*setSession (isEncrypted, address, { key, counter }, cb) {
|
||||
@ -77,7 +80,7 @@ class API {
|
||||
return cb({
|
||||
error: "trace_id missed"
|
||||
});
|
||||
this.methods[method]?.(connection, request, cb);
|
||||
return this.methods[method]?.(connection, request, cb);
|
||||
} else {
|
||||
return cb({
|
||||
error: "required JSON-object based request"
|
||||
|
4
server/api/is-authed.js
Normal file
4
server/api/is-authed.js
Normal file
@ -0,0 +1,4 @@
|
||||
module.exports = function (con, req, cb) {
|
||||
return cb({ error: "At develop" });
|
||||
//;
|
||||
};
|
Loading…
Reference in New Issue
Block a user