Skip to content

Commit

Permalink
Fixed lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
f2reninj5 committed Jul 9, 2024
1 parent efe13e4 commit 901b049
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions server/src/routes/points/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Router as ExpressRouter } from "express"

import { handleFailedAuthentication, handleMethodNotAllowed, parseRouteId } from "@server/common/middleware"

import handlers from "./point_handlers"
import PointHandlers from "./point_handlers"

const points_router = ExpressRouter()
const handlers = new PointHandlers()

points_router
.route("/")
Expand All @@ -15,7 +15,7 @@ points_router
points_router
.route("/:point_id")
.all(parseRouteId("point_id"))
.get(handlers.getPointDetails)
.get(handlers.getPointDetails.bind(handlers))
.patch(handlers.patchPointDetails, handleFailedAuthentication)
.delete(handlers.deletePoint, handleFailedAuthentication)
.all(handleMethodNotAllowed)
Expand Down
5 changes: 1 addition & 4 deletions server/src/routes/points/point_handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ point_transform_factories.set("redeemer_id", value => {
return { condition: { redeemer_id: parsed_value } }
})

class PointHandlers {
export default class PointHandlers {
/**
* Handles a GET request to /points.
* For transparency, returns a list of points in the database with their values and redeemer's ID.
Expand Down Expand Up @@ -146,6 +146,3 @@ class PointHandlers {
response.json({ status: response.statusCode, message: "OK" })
}
}

const PointHandlersInstance = new PointHandlers()
export default PointHandlersInstance

0 comments on commit 901b049

Please sign in to comment.