-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maulana Ghozi Humama #2
Open
maulanaghozii
wants to merge
14
commits into
humble-fox-2019:master
Choose a base branch
from
maulanaghozii:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
44b4cc1
releases 0 - 2 done
maulanaghozii 48c53e2
migration from jquery to vue js
maulanaghozii 33229d7
model server done
maulanaghozii ac13aac
connected mongodb
maulanaghozii 1963a16
test
maulanaghozii 2464a53
authentication done
maulanaghozii f29f7d4
migrate from global to component
maulanaghozii cdaf154
server done
maulanaghozii 1dbf9c1
repair client
maulanaghozii 227eb9b
article solve
maulanaghozii 135da1b
repair logout
maulanaghozii 0be4ba7
GCS Done
maulanaghozii e68e518
debug tags fix
maulanaghozii 41bbd07
delete word wma
maulanaghozii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,122 @@ | ||
# mini-wp | ||
# Hackticle | ||
|
||
``` | ||
Client : | ||
http://winiwp-ghz.maulanaghozi.web.id | ||
|
||
BaseURL / Server : | ||
http://35.187.228.79 | ||
``` | ||
|
||
## **List of User Routes** : | ||
|
||
| HTTP | Routes | Headers | Body | Description | | ||
| --- | ----- | --- | --- | --- | | ||
| POST | /users | none | name,email, password | Register new user | | ||
| POST | /users/login | none | email,password | Login user | | ||
| POST | /users/signin | none | token | Login 3rd API (google) | | ||
|
||
--- | ||
|
||
## **List of Article Routes** | ||
|
||
| HTTP | Routes | Headers | Body | Description | | ||
| --- | ----- | --- | --- | --- | | ||
| GET | /articles/userId | token | none | read all article where author is user id | | ||
| POST | /articles | token | {title, content, tags, published, photo} | Create new Article (authentication) | | ||
| PUT | /articles/:id | token | {title, content, tags, published, photo} | Update article (authentication, authoriation) | | ||
| DELETE | /articles/:id | token | none | Delete image (authentication, authorization) | | ||
|
||
--- | ||
|
||
## **Response** | ||
|
||
1. Routes : /users | ||
- Method : POST | ||
``` | ||
Response : | ||
{ | ||
"data": { | ||
"_id": "5d7eedb4e0824c0c4dxxxxx", | ||
"name": "admin", | ||
"password": "xxxxxxxxxxxxxxxxxxx", | ||
"email": "[email protected]", | ||
"createdAt": "2019-09-16T02:04:36.901Z", | ||
"updatedAt": "2019-09-16T02:04:36.901Z", | ||
"__v": 0 | ||
|
||
} | ||
} | ||
``` | ||
|
||
2. Routes : /users/login | ||
- Method : POST | ||
``` | ||
Response : | ||
{ | ||
"message": "Login Success", | ||
"id": "5d7eedb4e0xxxxxxxxxxxx", | ||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkN2VlZGI0ZTA4MjRjMGM0ZGE1ZWFjYiIsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwiaWF0IjoxNTY4NTk5NTkzfQ.Lxxxxxxxxxxxxxxxxxxxxxxx" | ||
} | ||
``` | ||
|
||
3. Routes : /users/signin | ||
- Method : POST | ||
``` | ||
Response : | ||
{ | ||
"message": "Login Success", | ||
"id": "5d7eedb4e0xxxxxxxxxxxx", | ||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjVkN2VlZGI0ZTA4MjRjMGM0ZGE1ZWFjYiIsImVtYWlsIjoiYWRtaW5AZ21haWwuY29tIiwiaWF0IjoxNTY4NTk5NTkzfQ.Lxxxxxxxxxxxxxxxxxxxxxxx" | ||
} | ||
``` | ||
|
||
4. Routes : /articles | ||
- Method : POST | ||
``` | ||
Response : | ||
{ | ||
"tags": [ | ||
"makan", | ||
"minum", | ||
"hacktiv8", | ||
"tidur" | ||
], | ||
"_id": "5d7f16ffe0824xxxxxxx", | ||
"title": "Siswa kelas 9 berhasil menembus security google", | ||
"author": "5d7eedb4e0824c0c4dxxxxxx", | ||
"content": "kita harus bangga pada siswa kelas 9 ini karena kecerdasannya dia dapat masuk ke dalam security google", | ||
"published": true, | ||
"photo": "https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60", | ||
"createdAt": "2019-09-16T05:00:47.303Z", | ||
"updatedAt": "2019-09-16T05:00:47.303Z" | ||
} | ||
``` | ||
|
||
|
||
4. Routes : /articles/userId | ||
- Method : GET | ||
``` | ||
Response : | ||
{ | ||
"articles": [ | ||
{ | ||
"tags": [ | ||
"makan", | ||
"minum", | ||
"hacktiv8", | ||
"tidur" | ||
], | ||
"_id": "5d7f16ffe0824c0c4xxxxxxx", | ||
"title": "Siswa kelas 9 berhasil menembus security google", | ||
"author": "5d7eedb4e0824c0c4dxxxxx", | ||
"content": "kita harus bangga pada siswa kelas 9 ini karena kecerdasannya dia dapat masuk ke dalam security google", | ||
"published": true, | ||
"photo": "https://images.unsplash.com/photo-1498050108023-c5249f4df085?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=60", | ||
"createdAt": "2019-09-16T05:00:47.303Z", | ||
"updatedAt": "2019-09-16T05:00:47.303Z" | ||
}, ........ | ||
], | ||
"Author": "admin" | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
.cache | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<link href="https://www.fontify.me/wf/de776f4ae91f407b7752acbaa9433770" rel="stylesheet" type="text/css"> | ||
<link href="https://fonts.googleapis.com/css?family=Work+Sans&display=swap" rel="stylesheet"> | ||
<meta name="google-signin-client_id" | ||
content="1076346870616-g67nkvgg398aenfju4u3u59252e4rrd7.apps.googleusercontent.com"> | ||
<title>Hackticle</title> | ||
<style> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
box-sizing: border-box; | ||
font-family: 'helvetica', arial, sans-serif; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div id="App"></div> | ||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@8"></script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ketika menggunakan npm install, tidak perlu lagi menggunakan CDN |
||
<script src="https://apis.google.com/js/platform.js" async defer></script> | ||
<script src="https://apis.google.com/js/api:client.js"></script> | ||
<script src="https://kit.fontawesome.com/5cd1e1d933.js"></script> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. kalo dari data network ini yang bkin berat |
||
<script src="./src/main.js"></script> | ||
</body> | ||
|
||
</html> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
coba nanti dilengkapi :D