-
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.
Merge pull request #6 from Wikidata-Cameroon/dev
Did api versioning
- Loading branch information
Showing
16 changed files
with
97 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
npm run pre-commit |
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
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { Router } from "express"; | ||
import { authRouter } from "./routes/auth-router"; | ||
import { languageRouter } from "./routes/language-router"; | ||
import { matchRouter } from "./routes/match-router"; | ||
|
||
const routerV1 = Router(); | ||
|
||
routerV1.get("/", (_, res) => { | ||
return res.status(200).json({ | ||
message: "🚀 wiki-lex-match V1 🚀", | ||
}); | ||
}); | ||
|
||
routerV1.use("/auth", authRouter); | ||
routerV1.use("/languages", languageRouter); | ||
routerV1.use("/match", matchRouter); | ||
|
||
export default routerV1; |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Router } from "express"; | ||
|
||
const routerV2 = Router(); | ||
|
||
routerV2.get("/", (_, res) => { | ||
return res.status(200).json({ | ||
message: "🚀 wiki-lex-match V2 🚀", | ||
}); | ||
}); | ||
|
||
routerV2.get("*", (_, res) => { | ||
return res.status(200).json({ | ||
message: "API v2 is not yet available", | ||
}); | ||
}); | ||
|
||
export default routerV2; |
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