| ์ปฌ๋ผ๋ช | ํ์ | ๋น๊ณ |
|---|---|---|
| user_id | string | PK |
| password | string | |
| name | string | |
| phone | string | |
| string | ||
| profile_img_src | string |
| ์ปฌ๋ผ๋ช | ํ์ | ๋น๊ณ |
|---|---|---|
| user_id | string | FK |
| content | string | |
| created_at | datetime | |
| feed_img_src | string |
| ์ปฌ๋ผ๋ช | ํ์ | ๋น๊ณ |
|---|---|---|
| user_id | string | FK |
| feed_idx | string(ObjectId) | FK |
| content | string | |
| created_at | datetime |
| ์ปฌ๋ผ๋ช | ํ์ | ๋น๊ณ |
|---|---|---|
| following | string | FK |
| follower | string | FK |
| ์ปฌ๋ผ๋ช | ํ์ | ๋น๊ณ |
|---|---|---|
| user_id | string | FK |
| feed_idx | string(ObjectId) | FK |
| created_at | datetime |
| Method | URL | Request | Response | Etc | |
|---|---|---|---|---|---|
| register | POST | /api/auth/register | { | ||
| id: id, | |||||
| password: password | |||||
| } | { | ||||
| ok : true | |||||
| } | |||||
| { | |||||
| ok : false | |||||
| (ID์ค๋ณต) | |||||
| } | ํ์๊ฐ์ / | ||||
| id : 5~10์ | |||||
| Password: | |||||
| 8์ - 20์ | |||||
| ํน์๋ฌธ์,์ซ์ ํฌํจ | |||||
| login | POST | /api/auth/login | { | ||
| id: id, | |||||
| password: password | |||||
| } | { | ||||
| ok : true | |||||
| } | |||||
| { | |||||
| ok : false | |||||
| (PW ๋ถ์ผ์น, ID ์์) | |||||
| } | ๋ก๊ทธ์ธ | ||||
| logout | POST | /api/auth/logout | { | ||
| id: id | |||||
| } | { | ||||
| ok : true | |||||
| } | ๋ก๊ทธ์์ | ||||
| update | POST | /api/auth/update | { | ||
| id: id, | |||||
| ๋ณ๊ฒฝํ ํญ๋ชฉ | |||||
| } | { | ||||
| ok : true | |||||
| } | ํ์ ์ ๋ณด ๋ณ๊ฒฝ |
| Method | URL | Request | Response | Etc | |
|---|---|---|---|---|---|
| get_profile | GET | /api/profile | { | ||
| } | { | ||||
| profile_img_src, | |||||
| following, follower, | |||||
| feed_img_src | |||||
| } | |||||
| set_profile_img | POST | /api/profile/img | { | ||
| profile_img_src : profile_img_src | |||||
| } | { | ||||
| ok : true | |||||
| } | |||||
| set_following | POST | /api/profile/following | { | ||
| following_id : user_id | |||||
| } | { | ||||
| ok : true | |||||
| } | |||||
| set_follower | POST | /api/profile/follower | { | ||
| follower_id : user_id | |||||
| } | { | ||||
| ok : true | |||||
| } | |||||
| user_feed | GET | /api/profile/feed | { | ||
| user_id : user_id | |||||
| content | |||||
| } | { | ||||
| ok : true | |||||
| } |
| Method | URL | Request | Response | Etc | ||
|---|---|---|---|---|---|---|
| feed | GET | /api/feed | { | |||
| ์ฌ์ง, | ||||||
| user_id, | ||||||
| profile_img_src, | ||||||
| creat_at | ||||||
| } | ||||||
| feed | POST | /api/feed | { | |||
| ์ฌ์ง, | ||||||
| user_id, profile_img_src, creat_at | ||||||
| } | { | |||||
| ok : true | ||||||
| } | ์ ์ฅ | |||||
| comment | GET | /api/comment | { | |||
| content, | ||||||
| write_id, | ||||||
| feed_idx, | ||||||
| creat_at, | ||||||
| profile_img_src | ||||||
| } | ||||||
| POST | /api/comment | { | ||||
| content, | ||||||
| write_id, feed_idx, creat_at, profile_img_src | ||||||
| } | { | |||||
| ok : true | ||||||
| } | ์ ์ฅ | |||||
| comment_remove | POST | /api/comment/remove | { | |||
| comment_id | ||||||
| } | { | |||||
| ok : true | ||||||
| } | ||||||
| liked | GET | /api/liked | { | |||
| user_id, feed_idx | ||||||
| } | ||||||
| POST | /api/liked | { | ||||
| user_id, feed_idx | ||||||
| } | { | |||||
| ok : true | ||||||
| } | ์ ์ฅ | |||||
| liked_cancel | POST | /api/liked/cancel | { | |||
| user_id, feed_idx | ||||||
| } | { | |||||
| ok : true | ||||||
| } | ์ญ์ |
| Method | URL | Request | Response | Etc | ||
|---|---|---|---|---|---|---|
| following | ||||||
| (ํ๋ก์ ์ ์ฒญ) | GET | { | ||||
| user.id | ||||||
| user.follower | ||||||
| } | { | |||||
| user.id | ||||||
| user.follower + 1 | ||||||
| } | ||||||
| follow | Post | user.following +1 | ||||