Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,38 @@

Отрефакторить /registration запрос:

сделать проверки
хэшировать пароль
сделать проверки OK
хэшировать пароль OK


Сделать API для следующих запросов:

GET :

/post - возвращает список всех записей
/post - возвращает список всех записей OK

/posts/:id - возвращает запись с заданным id (req.param.id)
/posts/:id - возвращает запись с заданным id (req.param.id) OK

/user/:id/following - возвращает список кумиров указанного юзера (кого этот юзер фолловит, отслеживает)
/user/:id/following - возвращает список кумиров указанного юзера (кого этот юзер фолловит, отслеживает) OK

/user/:id/folowers - возвращает список фанатов указанного юзера (кто отслеживает указанного юзера)
/user/:id/folowers - возвращает список фанатов указанного юзера (кто отслеживает указанного юзера) OK


DELETE:

/posts/:id - удаляет запись с заданным id (только если currentUser.id == author.id || currentUser.id == owner.id)
/posts/:id - удаляет запись с заданным id (только если currentUser.id == author.id || currentUser.id == owner.id) OK

/user/:id/follow - отписаться (перестать отслеживать) от юзера с заданным id
/user/:id/follow - отписаться (перестать отслеживать) от юзера с заданным id OK


PUT:

/me - редактировать данные о себе
/me - редактировать данные о себе OK

/posts/:id редактировать запись (только если currentUser.id == author.id)
/posts/:id редактировать запись (только если currentUser.id == author.id) OK


POST:

/user/:id/follow - подписаться на юзера с заданным id
/user/:id/follow - подписаться на юзера с заданным id OK

341 changes: 341 additions & 0 deletions Social%20Network%20Project.json.postman_collection
Original file line number Diff line number Diff line change
@@ -0,0 +1,341 @@
{
"id": "5e033b16-8151-c70f-c605-aae95c988855",
"name": "Social Network Project",
"description": "",
"order": [
"1a2ef65c-0abb-0221-f322-c53163f10dce",
"939d616a-0028-1bfd-34c1-78a1e9b1f13d",
"e21a8734-8e8c-ad5a-3fe3-b53b12ed21b2",
"c9a62701-3fe8-f06b-a18e-81289ba24f24",
"bda1c237-b1cd-a984-1fa2-123f19c63c19",
"e9caca8e-1d55-1040-8392-7934708a38a4",
"bef8ea8b-fe43-d350-f253-0bcc1c53e0e9",
"25e93113-5298-1ad0-7c19-301e03088aad",
"ee8239e4-7996-5261-0d21-c0d8f06c0b75",
"c6e0d4c7-0e38-a69a-b615-28dba23268b9",
"8ab80377-2d4c-3f9c-097e-99a4df147cdc",
"39354428-48ed-3696-8c84-87bce170a377",
"a8d5f618-7cc2-eb10-8332-4c2786daa29f",
"fbb2183d-5d75-2cf1-4f44-b395fdd43a7f",
"124203f4-6fde-c67a-c332-c2169f274227"
],
"folders": [],
"timestamp": 1439307457010,
"owner": "",
"remoteLink": "",
"public": false,
"requests": [
{
"id": "124203f4-6fde-c67a-c332-c2169f274227",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/posts/:id",
"preRequestScript": "",
"pathVariables": {
"id": "1439462753604"
},
"method": "PUT",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439468997772,
"name": "127.0.0.10:100/posts/:id",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": [],
"rawModeData": "{\n \"content\": \"Hamsters. Full lifecycle from birth to death.\"\n}"
},
{
"id": "1a2ef65c-0abb-0221-f322-c53163f10dce",
"headers": "Content-Type: application/json\n",
"url": "127.0.0.10:100/register",
"preRequestScript": "",
"pathVariables": {},
"method": "POST",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439371930549,
"name": "127.0.0.10:100/register",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"rawModeData": "{\n \"email\": \"am@dfg.com\",\n \"nick\": \"vl\",\n \"pwd\": \"123456\",\n \"repeatPwd\": \"123456\"\n}"
},
{
"id": "25e93113-5298-1ad0-7c19-301e03088aad",
"headers": "authorization: vl:123456\n",
"url": "127.0.0.10:100/posts/:id",
"preRequestScript": "",
"pathVariables": {
"id": "1439225509193"
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439405728620,
"name": "127.0.0.10:100/posts/:id",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "39354428-48ed-3696-8c84-87bce170a377",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/user/:id/followers",
"preRequestScript": "",
"pathVariables": {
"id": "1439225345875"
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439414341991,
"name": "127.0.0.10:100/user/:id/followers",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "8ab80377-2d4c-3f9c-097e-99a4df147cdc",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/user/:id/following",
"preRequestScript": "",
"pathVariables": {
"id": "1439315897737"
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439457875184,
"name": "127.0.0.10:100/user/:id/following",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "939d616a-0028-1bfd-34c1-78a1e9b1f13d",
"headers": "authorization: vl:123456\n",
"url": "127.0.0.10:100/user",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439318933936,
"name": "127.0.0.10:100/user",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "a8d5f618-7cc2-eb10-8332-4c2786daa29f",
"headers": "authorization: vl:123456\n",
"url": "127.0.0.10:100/posts/:id",
"pathVariables": {
"id": "1439404599850"
},
"preRequestScript": "",
"method": "DELETE",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"data": [],
"dataMode": "params",
"name": "127.0.0.10:100/posts/:id",
"description": "",
"descriptionFormat": "html",
"time": 1439461994243,
"version": 2,
"responses": [],
"tests": "",
"currentHelper": "normal",
"helperAttributes": {}
},
{
"id": "bda1c237-b1cd-a984-1fa2-123f19c63c19",
"headers": "authorization: vl:123456\n",
"url": "127.0.0.10:100/user/:id/wall",
"preRequestScript": "",
"pathVariables": {
"id": "1439225345875"
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439413547495,
"name": "127.0.0.10:100/user/:id/wall",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "bef8ea8b-fe43-d350-f253-0bcc1c53e0e9",
"headers": "authorization: vl:123456\n",
"url": "127.0.0.10:100/post",
"pathVariables": {},
"preRequestScript": "",
"method": "GET",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"data": [],
"dataMode": "params",
"name": "127.0.0.10:100/post",
"description": "",
"descriptionFormat": "html",
"time": 1439405042038,
"version": 2,
"responses": [],
"tests": "",
"currentHelper": "normal",
"helperAttributes": {}
},
{
"id": "c6e0d4c7-0e38-a69a-b615-28dba23268b9",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/user/:id/follow",
"preRequestScript": "",
"pathVariables": {
"id": "1439225345875"
},
"method": "DELETE",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439413508410,
"name": "127.0.0.10:100/user/:id/follow",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": [],
"rawModeData": ""
},
{
"id": "c9a62701-3fe8-f06b-a18e-81289ba24f24",
"headers": "authorization: vl:123456\n",
"url": "127.0.0.10:100/user/:id",
"preRequestScript": "",
"pathVariables": {
"id": "1439222467622"
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439413561093,
"name": "127.0.0.10:100/user/:id",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "e21a8734-8e8c-ad5a-3fe3-b53b12ed21b2",
"headers": "authorization: vl:333\n",
"url": "127.0.0.10:100/me",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439467598695,
"name": "127.0.0.10:100/me",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": []
},
{
"id": "e9caca8e-1d55-1040-8392-7934708a38a4",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/user/:id/wall",
"preRequestScript": "",
"pathVariables": {
"id": "1439315897737"
},
"method": "POST",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439462636334,
"name": "127.0.0.10:100/user/:id/wall",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": [],
"rawModeData": "{"
},
{
"id": "ee8239e4-7996-5261-0d21-c0d8f06c0b75",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/user/:id/follow",
"preRequestScript": "",
"pathVariables": {
"id": "1439225345875"
},
"method": "POST",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439408388243,
"name": "127.0.0.10:100/user/:id/follow",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": [],
"rawModeData": ""
},
{
"id": "fbb2183d-5d75-2cf1-4f44-b395fdd43a7f",
"headers": "authorization: vl:123456\nContent-Type: application/json\n",
"url": "127.0.0.10:100/me",
"preRequestScript": "",
"pathVariables": {},
"method": "PUT",
"data": [],
"dataMode": "raw",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1439468025878,
"name": "127.0.0.10:100/me",
"description": "",
"collectionId": "5e033b16-8151-c70f-c605-aae95c988855",
"responses": [],
"rawModeData": "{\n \"pwd\":\"123456\"\n}"
}
]
}
Loading