11import { IHttpServer } from '@objectstack/core' ;
22import { RouteManager } from './route-manager.js' ;
3- import { RestServerConfig , CrudOperation , RestApiConfig , CrudEndpointsConfig , MetadataEndpointsConfig , BatchEndpointsConfig , RouteGenerationConfig } from '@objectstack/spec/api' ;
3+ import { RestServerConfig , RestApiConfig , CrudEndpointsConfig , MetadataEndpointsConfig , BatchEndpointsConfig , RouteGenerationConfig } from '@objectstack/spec/api' ;
44import { ObjectStackProtocol } from '@objectstack/spec/api' ;
55
66/**
@@ -89,7 +89,6 @@ type NormalizedRestServerConfig = {
8989 * restServer.registerRoutes();
9090 */
9191export class RestServer {
92- private server : IHttpServer ;
9392 private protocol : ObjectStackProtocol ;
9493 private config : NormalizedRestServerConfig ;
9594 private routeManager : RouteManager ;
@@ -99,7 +98,6 @@ export class RestServer {
9998 protocol : ObjectStackProtocol ,
10099 config : RestServerConfig = { }
101100 ) {
102- this . server = server ;
103101 this . protocol = protocol ;
104102 this . config = this . normalizeConfig ( config ) ;
105103 this . routeManager = new RouteManager ( server ) ;
@@ -212,7 +210,7 @@ export class RestServer {
212210 this . routeManager . register ( {
213211 method : 'GET' ,
214212 path : basePath ,
215- handler : async ( req : any , res : any ) => {
213+ handler : async ( _req : any , res : any ) => {
216214 try {
217215 const discovery = await this . protocol . getDiscovery ( { } ) ;
218216 res . json ( discovery ) ;
@@ -239,7 +237,7 @@ export class RestServer {
239237 this . routeManager . register ( {
240238 method : 'GET' ,
241239 path : metaPath ,
242- handler : async ( req : any , res : any ) => {
240+ handler : async ( _req : any , res : any ) => {
243241 try {
244242 const types = await this . protocol . getMetaTypes ( { } ) ;
245243 res . json ( types ) ;
0 commit comments