feat: adding support for hopp-cli in self-host Hoppscotch (#4079)
* feat: created a new table to store user PATs * chore: renamed UserTokens table name to PersonalAccessToken * chore: added unique property to token column * chore: made expiresOn field optional * chore: created access-token module * feat: created access-token rest routes * chore: created a new auth guard for PATs * chore: scaffolded routes in team collection and environments modules for CLI * chore: created method to update lastUsedOn property for accessTokens * chore: created interceptor to update lastUsedOn property of PAT * feat: interceptor to update lastUpdatedOn property complete * chore: removed unused imports in access-token interceptor * chore: moved routes to fetch collection and environment into access-token module * feat: added routes to fetch collections and environments for CLI * chore: modified access-token interceptor * chore: removed log statement from interceptor * chore: added team member checking logic to ForCLI methods in team collection and environments module * chore: changed return error messages to those defined in spec * chore: added comments to all service methods * chore: removed unused imports * chore: updated testcases for team-environments module service file * chore: added and updated testcases * chore: removed unneseccary SQL from auto-generated migration sql for PAT * chore: remobed JWTAuthGuard from relevant routes in PAT controllers file * chore: modified token for auth in PATAuthGuard * chore: changed error codes in some certain service methods in access-token module * feat: worked on feedback for PR review * chore: renamed service method in access-token module * chore: removed console log statements * chore: modified cli error type * test: fix broken test case * chore: changed target of hopp-old-backend to prod --------- Co-authored-by: mirarifhasan <arif.ishan05@gmail.com>
This commit is contained in:
@@ -118,11 +118,11 @@ services:
|
||||
restart: always
|
||||
environment:
|
||||
# Edit the below line to match your PostgresDB URL if you have an outside DB (make sure to update the .env file as well)
|
||||
- DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
|
||||
# - DATABASE_URL=postgresql://postgres:testpass@hoppscotch-db:5432/hoppscotch?connect_timeout=300
|
||||
- PORT=3000
|
||||
volumes:
|
||||
# Uncomment the line below when modifying code. Only applicable when using the "dev" target.
|
||||
# - ./packages/hoppscotch-backend/:/usr/src/app
|
||||
- ./packages/hoppscotch-backend/:/usr/src/app
|
||||
- /usr/src/app/node_modules/
|
||||
depends_on:
|
||||
hoppscotch-db:
|
||||
|
||||
Reference in New Issue
Block a user