Skip to content

Commit

Permalink
update apk route and swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
SheItoon committed Jan 5, 2024
1 parent 821ead5 commit e7de87a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ node_modules
*lock.json
save
coverage
yarn.lock
yarn.lock
files
1 change: 1 addition & 0 deletions src/routes/nodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ node_router.patch('/admin', authenticateTokenAdm, async (req, res) => {
* type: object
* required:
* - id
* - parkourId
* properties:
* name:
* type: number
Expand Down
26 changes: 26 additions & 0 deletions src/routes/parkour.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,32 @@ import { authenticateToken, authenticateTokenAdm } from '../utils.js';
* order: 1
*/

/**
* @swagger
* components:
* schemas:
* ParkourNode:
* type: object
* required:
* - parkourId
* - nodeId
* - order
* properties:
* parkourId:
* type: string
* description: The ID of the associated parkour
* nodeId:
* type: integer
* description: The ID of the associated node
* order:
* type: integer
* description: The order of the node in the parkour
* example:
* parkourId: "abc123"
* nodeId: 1
* order: 2
*/

const parkour_router = express.Router();

/**
Expand Down
2 changes: 1 addition & 1 deletion src/routes/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ utils_router.post('/signin', async (req, res) => {

utils_router.get('/apk', (req, res) => {
try {
const filePath = `${__dirname}/files/example.txt`;
const filePath = `${__dirname}/files/app-debug.apk`;
res.download(filePath, (err) => {
if (err) {
console.log('Error:', err);
Expand Down

0 comments on commit e7de87a

Please sign in to comment.