Skip to content

Commit 99c3eab

Browse files
authored
Merge pull request cyclic-software#3 from Capstone-Bangkit/login-api
get user without token
2 parents 32b6cbe + 93bb678 commit 99c3eab

File tree

3 files changed

+9
-18
lines changed

3 files changed

+9
-18
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: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,28 @@
1-
GET http://localhost:5000/users
2-
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZFVzZXIiOjI5LCJuYW1hIjoicmFuZHkyMzU2MSIsImVtYWlsIjoidGVzZW1haWwxMkBnbWFpbC5jb20iLCJpYXQiOjE2NTIzODIxNjcsImV4cCI6MTY1MjM4MjE4N30.GT_hQ4qLLWd9jcIyut1DAFYeQ21ydIAItSaUxC4bt2o
1+
GET http://34.101.78.157:5000/users
2+
33

44

55

66
###
7-
POST http://localhost:5000/users
7+
POST http://34.101.78.157:5000/users
88
Content-Type: application/json
99

1010
{
11-
"nama": "randy23561",
11+
"name": "tesnama1",
1212
"email": "[email protected]",
1313
"password": "1234567",
1414
"rePassword": "1234567"
1515
}
1616

1717
###
18-
POST http://localhost:5000/login
18+
POST http://34.101.78.157:5000/login
1919
Content-Type: application/json
2020

2121
{
22-
"email": "tesemail123@gmail.com",
22+
"email": "tesemail1234@gmail.com",
2323
"password": "1234567"
2424
}
2525

2626
###
27-
POST http://localhost:5000/article
28-
Content-Type: application/json
29-
30-
{
31-
"title":"sasasasasa",
32-
"image":"sasasasaasa.jpg",
33-
"description":"savbhjavshjavfjavfajhvfjhavsfhjasvfhj"
34-
}
35-
27+
SERVER : 34.101.78.157
28+
PORT : 5000

routes/routes.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { articlePost, findArticles, updateArticle } from "../controller/article.
88

99
const router = express.Router();
1010

11-
router.get("/users",verifyToken, getUsers);
11+
router.get("/users", getUsers);
1212
router.post("/register", Register);
1313
router.post("/login", Login);
1414
// router.get("/token", refreshToken);

0 commit comments

Comments
 (0)