Skip to content

Commit 856451d

Browse files
committed
Merge branch 'login-token' of https://github.com/Capstone-Bangkit/Rifsa-Computing into login-token
2 parents c4896ca + 1cd6263 commit 856451d

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,2 @@
1-
./controller/article.js
2-
./models/article.js
31
users.sql
42
node_modules

request.rest

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,36 @@
11
### Get User (Token expires after 60s)
2-
GET http://localhost:5000/users
2+
GET http://34.101.78.157:5000/users
33
Authorization: Bearer <token>
44

55

66

77
### Register User
8-
POST http://localhost:5000/register
8+
POST http://34.101.78.157:5000/register
99
Content-Type: application/json
1010

1111
{
12-
"nama": "randy23561",
12+
"name": "tesnama1",
1313
"email": "[email protected]",
1414
"password": "1234567",
1515
"rePassword": "1234567"
1616
}
1717

18-
### Login
19-
POST http://localhost:5000/login
18+
POST http://34.101.78.157:5000/login
2019
Content-Type: application/json
2120

2221
{
23-
"email": "tesemail123@gmail.com",
22+
"email": "tesemail1234@gmail.com",
2423
"password": "1234567"
2524
}
2625

2726
### Get New Token
28-
GET http://localhost:5000/token
27+
GET http://34.101.78.157:5000/token
2928
Content-Type: application/json
3029

3130
### Logout
3231
DELETE http://localhost:5000/logout
33-
Content-Type: application/json
32+
Content-Type: application/json
33+
###
34+
SERVER : 34.101.78.157
35+
PORT : 5000
36+

routes/routes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { refreshToken } from "../controller/refreshToken.js";
88

99
const router = express.Router();
1010

11+
1112
router.get("/users", verifyToken, getUsers);
1213
router.post("/register", Register);
1314
router.post("/login", Login);

0 commit comments

Comments
 (0)