cloudservices/src/class/Route.ts

34 lines
693 B
TypeScript
Raw Normal View History

2019-11-16 19:24:43 -05:00
import { Router as router } from 'express';
import { Server } from '../api';
export default class Route {
public server: Server;
public router: router;
public conf: { path: string, deprecated?: boolean };
constructor(server: Server, conf: { path: string, deprecated?: boolean }) {
this.server = server;
this.router = router();
2019-11-16 20:04:00 -05:00
this.conf = conf;
2019-11-16 19:24:43 -05:00
}
2019-11-16 19:51:29 -05:00
public bind() {}
2019-11-16 19:24:43 -05:00
get constants() {
return {
codes: {
SUCCESS: 100,
UNAUTHORIZED: 101,
2019-11-16 22:55:38 -05:00
PERMISSION_DENIED: 104,
2019-11-16 19:24:43 -05:00
NOT_FOUND: 104,
ACCOUNT_NOT_FOUND: 1041,
CLIENT_ERROR: 1044,
SERVER_ERROR: 105,
UNKNOWN_SERVER_ERROR: 1051,
},
};
}
}