Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
♻️ Add global controller prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Nov 8, 2020
1 parent fc5fb29 commit 52e5de8
Show file tree
Hide file tree
Showing 14 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion http/create-access-token.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@userId = 1

POST {{baseUrl}}/users/{{userId}}/access-tokens
Expand Down
2 changes: 1 addition & 1 deletion http/create-api-key.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@groupId = 1

POST {{baseUrl}}/groups/{{groupId}}/api-keys
Expand Down
2 changes: 1 addition & 1 deletion http/create-group.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@userId = 1

POST {{baseUrl}}/users/{{userId}}/memberships
Expand Down
2 changes: 1 addition & 1 deletion http/get-access-token-scopes.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@userId = 1

GET {{baseUrl}}/users/{{userId}}/access-tokens/scopes
Expand Down
2 changes: 1 addition & 1 deletion http/get-access-tokens.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@userId = 1

GET {{baseUrl}}/users/{{userId}}/access-tokens
Expand Down
2 changes: 1 addition & 1 deletion http/get-group-with-api-key.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@groupId = 1

GET {{baseUrl}}/groups/{{groupId}}
Expand Down
2 changes: 1 addition & 1 deletion http/get-group.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@groupId = 1

GET {{baseUrl}}/groups/{{groupId}}
Expand Down
2 changes: 1 addition & 1 deletion http/get-user-with-access-token.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@userId = 1

GET {{baseUrl}}/users/{{userId}}
Expand Down
2 changes: 1 addition & 1 deletion http/get-user.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1
@userId = 1

GET {{baseUrl}}/users/{{userId}}
Expand Down
2 changes: 1 addition & 1 deletion http/login.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1

POST {{baseUrl}}/auth/login
content-type: application/json
Expand Down
2 changes: 1 addition & 1 deletion http/refresh.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1

POST {{baseUrl}}/auth/refresh
content-type: application/json
Expand Down
2 changes: 1 addition & 1 deletion http/register.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1

POST {{baseUrl}}/auth/register
content-type: application/json
Expand Down
2 changes: 1 addition & 1 deletion http/verify-email.http
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@baseUrl = http://localhost:3000
@baseUrl = http://localhost:3000/v1

POST {{baseUrl}}/auth/verify-email
content-type: application/json
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ async function bootstrap() {
const document = SwaggerModule.createDocument(app, options);
SwaggerModule.setup('api', app, document);

app.setGlobalPrefix('v1');
app.use(responseTime());
app.useStaticAssets(join(__dirname, '..', 'static'));

Expand Down

0 comments on commit 52e5de8

Please sign in to comment.