Change route order

This commit is contained in:
PJ 2020-01-27 13:12:49 +01:00
parent b720b5f0d6
commit b68052b475
1 changed files with 11 additions and 10 deletions

View File

@ -117,6 +117,17 @@ export class Server {
}) })
) )
this.app.get(
"/stats", this.handleStatsGET.bind(this)
// TODO: redirect to protalstats
// proxy("http://localhost:9980/renter/portalstats", {
// proxyReqOptDecorator: (opts, _) => {
// opts.headers["User-Agent"] = "Sia-Agent"
// return opts
// },
// })
)
this.app.get( this.app.get(
"/web/:hash", (req: Request, res: Response) => { "/web/:hash", (req: Request, res: Response) => {
const { hash } = req.params const { hash } = req.params
@ -133,16 +144,6 @@ export class Server {
} }
) )
this.app.get(
"/stats", this.handleStatsGET.bind(this)
// TODO: redirect to protalstats
// proxy("http://localhost:9980/renter/portalstats", {
// proxyReqOptDecorator: (opts, _) => {
// opts.headers["User-Agent"] = "Sia-Agent"
// return opts
// },
// })
)
} }
private async handleStatsGET(req: Request, res: Response): Promise<Response> { private async handleStatsGET(req: Request, res: Response): Promise<Response> {