-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[deni]: Fix writing script with eslint
- Loading branch information
1 parent
1baa954
commit 294ca43
Showing
10 changed files
with
202 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
import listingService from "../services/ListingService"; | ||
import listingService from '../services/ListingService'; | ||
|
||
export const getAllListings = async (req, res, next) => { | ||
export const getAllListings = async (req, res) => { | ||
const data = await listingService.getAllListings(); | ||
res | ||
.status(200) | ||
.json({code: 200, data:data, message: "SUCCESS"}) | ||
.json({code: 200, data:data, message: 'SUCCESS'}) | ||
.end(); | ||
} | ||
}; | ||
|
||
export const getListingById = async (req, res, next) => { | ||
export const getListingById = async (req, res) => { | ||
const data = await listingService.getListingById(req.params.id); | ||
res | ||
.status(200) | ||
.json({code: 200, data: data, message: "SUCCESS"}) | ||
.json({code: 200, data: data, message: 'SUCCESS'}) | ||
.end(); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import listingRouter from "./routers/listing"; | ||
import express from "express"; | ||
import listingRouter from './routers/listing'; | ||
import express from 'express'; | ||
|
||
export default (app) => { | ||
const router = express.Router(); | ||
router.use("/listing", listingRouter); | ||
app.use("/v1", router); | ||
} | ||
router.use('/listing', listingRouter); | ||
app.use('/v1', router); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
import express from "express"; | ||
import { getAllListings, getListingById } from "../../controllers/listing"; | ||
import express from 'express'; | ||
import { getAllListings, getListingById } from '../../controllers/listing'; | ||
|
||
const router = express.Router(); | ||
|
||
router.get("/", getAllListings); | ||
router.get("/:id", getListingById); | ||
router.get('/', getAllListings); | ||
router.get('/:id', getListingById); | ||
|
||
export default router; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters