Commit Graph
11 Commits
Author SHA1 Message Date
wancat 2c866d2e83 feat: add status, lastActivityAt column to session 2023-08-23 11:50:49 +08:00
wancat a151d2d667 feat: add type and color to response 2023-08-09 21:14:57 +08:00
wancat 6f368f761e feat: add hints to session, update API 2023-08-08 20:38:27 +08:00
wancat 3cea54ce71 feat: add new API for recording executed commands
- Add the `jsonwebtoken` dependency to the server's `package.json`
- Add a new file `commandController.js` to the server's API controllers
- Add a new route `/commands` to the server's API routes
- Add a new file `commands.js` to the server's API routes
- Modify the `index.js` file in the server's API routes to import and use the `commands.js` route
- Add a `newCommand` function to the `commandController.js` file
- Add a `Command` model to the `command.js` file in the server's models
- Add the `genSessionJWT` and `verifySessionJWT` functions to the `auth.js` file in the server's utils
- Modify the `attachContainer` function in the `docker.js` file in the server's utils to include a `token` parameter
- Modify the `swagger.yaml` file to include a new route `/commands` for recording executed commands in a session

Signed-off-by: wancat <wancat@wancat.cc>
2023-07-24 16:39:04 +08:00
wancat 0d9b068678 Update spec to use _id 2023-07-20 16:24:39 +08:00
wancat 5e8115be11 Add quest to API spec
+ Remove timestamps
+ Add 404 error handling
2023-07-20 15:36:51 +08:00
wancat 87f5e86108 Update API spec
+ to use json as post data
+ new SessionSummary component to return as list
2023-07-19 20:00:35 +08:00
wancat da4b1b18a4 Create fake auth middleware
Work in progress
2023-07-19 16:54:32 +08:00
wancat 04edfdd0dc Define routes, controllers of sessions
Work in progress, debugging
2023-07-19 16:42:09 +08:00
wancat 50443b96e0 Connect to mongodb, define schemas 2023-07-19 15:30:36 +08:00
wancat d51a75e5bc Re-organize code 2023-07-18 20:33:08 +08:00