{"info":{"_postman_id":"66c7cddd-fc36-47b5-aa91-8fba430cfed3","name":"GlubR Collection","description":"<html><head></head><body><p>This the GlubR API Documentation that shows how to use the endpoints along with path variables, request body and request parameters within this application.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"8682164","collectionId":"66c7cddd-fc36-47b5-aa91-8fba430cfed3","publishedId":"2sA3e49UNQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2024-07-10T18:13:31.000Z"},"item":[{"name":"Auth","item":[{"name":"Sign Up","id":"1835642b-3012-402c-b1d0-d21ab88d7ef8","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"MartinRex\",\n    \"email\": \"martinirex@yahoo.co.uk\",\n    \"password\": \"martinirex\",\n    \"profession\": \"Mobile Developer (Android)\",\n    \"gender\": \"Male\",\n    \"firstname\": \"Martin\",\n    \"lastname\": \"Rex\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/signup","description":"<h3 id=\"sign-up\">Sign Up</h3>\n<p>This endpoint allows users to sign up by providing their username, email, password, profession, gender, first name, and last name.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>username</code> (string, required): The username of the user.</li>\n<li><code>email</code> (string, required): The email address of the user.</li>\n<li><code>password</code> (string, required): The password for the user account.</li>\n<li><code>profession</code> (string, required): The profession of the user.</li>\n<li><code>gender</code> (string, required): The gender of the user.</li>\n<li><code>firstname</code> (string, required): The first name of the user.</li>\n<li><code>lastname</code> (string, required): The last name of the user.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><code>status</code> (string): Indicates the status of the request.</li>\n<li><code>user</code> (object): An object containing user details including username, email, password, profession, gender, first name, last name, user ID, creation timestamp, update timestamp, and version.</li>\n</ul>\n<h4 id=\"example-response\">Example Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"\",\n    \"user\": {\n        \"username\": \"\",\n        \"email\": \"\",\n        \"password\": \"\",\n        \"profession\": \"\",\n        \"gender\": \"\",\n        \"firstname\": \"\",\n        \"lastname\": \"\",\n        \"_id\": \"\",\n        \"createdAt\": \"\",\n        \"updatedAt\": \"\",\n        \"__v\": 0\n    }\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","auth","signup"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"4204d5ab-0b6a-4b10-b56d-4f8c0f4b0090","name":"Sign Up","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"AdamFor\",\n    \"email\": \"adam@yahoo.co.uk\",\n    \"password\": \"adamforlor\",\n    \"profession\": \"Mobile Developer (ReactNative)\",\n    \"gender\": \"Male\",\n    \"firstname\": \"Adam\",\n    \"lastname\": \"Folorunsho\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/signup"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"375"},{"key":"ETag","value":"W/\"177-PJIWWkJTsc0YMJ2QFcA47cmX8y0\""},{"key":"Date","value":"Wed, 10 Jul 2024 14:59:16 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"user\": {\n        \"username\": \"AdamFor\",\n        \"email\": \"adam@yahoo.co.uk\",\n        \"password\": \"$2a$10$EGeRO10o.HoeddrrnXK.d.ShKmlM4nErsAK4PVm6HoLrr/FdVCUgy\",\n        \"profession\": \"Mobile Developer (ReactNative)\",\n        \"gender\": \"Male\",\n        \"firstname\": \"Adam\",\n        \"lastname\": \"Folorunsho\",\n        \"_id\": \"668ea1c4fe738b62ae847963\",\n        \"createdAt\": \"2024-07-10T14:59:16.470Z\",\n        \"updatedAt\": \"2024-07-10T14:59:16.470Z\",\n        \"__v\": 0\n    }\n}"},{"id":"917a1e6f-f3e7-4136-9980-1ff229b49b54","name":"Bad Request 400","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"AdamFor\",\n    \"email\": \"adam@yahoo.co.uk\",\n    \"password\": \"adamforlor\",\n    \"profession\": \"Mobile Developer (ReactNative)\",\n    \"gender\": \"Male\",\n    \"firstname\": \"Adam\",\n    \"lastname\": \"Folorunsho\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/signup"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"46"},{"key":"ETag","value":"W/\"2e-l8R4ArFNYaxbuZ+VvYCvzX5tcrE\""},{"key":"Date","value":"Wed, 10 Jul 2024 17:35:34 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 400,\n    \"message\": \"User already exists\"\n}"}],"_postman_id":"1835642b-3012-402c-b1d0-d21ab88d7ef8"},{"name":"Login","id":"f3a7221e-9176-4f93-be33-8025832dece4","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"MartinRex\",\n    \"email\": \"martinirex@yahoo.co.uk\",\n    \"password\": \"martinirex\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login","description":"<h3 id=\"login-api\">Login API</h3>\n<p>This API endpoint allows users to log in and obtain an authentication token.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><code>username</code> (string, required): The username of the user.</li>\n<li><code>email</code> (string, required): The email address of the user.</li>\n<li><code>password</code> (string, required): The password of the user.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response of this request can be documented as a JSON schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n  \"type\": \"object\",\n  \"properties\": {\n    \"status\": {\n      \"type\": \"number\"\n    },\n    \"data\": {\n      \"type\": \"object\",\n      \"properties\": {\n        \"token\": {\n          \"type\": \"string\"\n        },\n        \"all\": {\n          \"type\": \"object\",\n          \"properties\": {\n            \"_id\": {\n              \"type\": \"string\"\n            },\n            \"username\": {\n              \"type\": \"string\"\n            },\n            \"email\": {\n              \"type\": \"string\"\n            },\n            \"password\": {\n              \"type\": \"string\"\n            },\n            \"profession\": {\n              \"type\": \"string\"\n            },\n            \"gender\": {\n              \"type\": \"string\"\n            },\n            \"firstname\": {\n              \"type\": \"string\"\n            },\n            \"lastname\": {\n              \"type\": \"string\"\n            },\n            \"createdAt\": {\n              \"type\": \"string\"\n            },\n            \"updatedAt\": {\n              \"type\": \"string\"\n            },\n            \"__v\": {\n              \"type\": \"number\"\n            },\n            \"id\": {\n              \"type\": \"string\"\n            }\n          }\n        }\n      }\n    }\n  }\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","auth","login"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"a144ded3-5799-4fea-93b9-81d44a829b53","name":"Success 200","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"MartinRex\",\n    \"email\": \"martinirex@yahoo.co.uk\",\n    \"password\": \"martinirex\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"authorization","value":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiNjY4ZTZmNTRlNTVkMGY3YmNhOWIxMDQ0IiwiZW1haWwiOiJtYXJ0aW5pcmV4QHlhaG9vLmNvLnVrIiwiaWF0IjoxNzIwNjI5MjI3LCJleHAiOjE3MjA3MTU2Mjd9.YUcfxP8FOFlsOTOykaVbC4YylbOno7skRfeId9ALTuA"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"640"},{"key":"ETag","value":"W/\"280-eCWKQvo4VdHRUHdZkInTbakbafk\""},{"key":"Date","value":"Wed, 10 Jul 2024 16:33:47 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"data\": {\n        \"token\": \"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiNjY4ZTZmNTRlNTVkMGY3YmNhOWIxMDQ0IiwiZW1haWwiOiJtYXJ0aW5pcmV4QHlhaG9vLmNvLnVrIiwiaWF0IjoxNzIwNjI5MjI3LCJleHAiOjE3MjA3MTU2Mjd9.YUcfxP8FOFlsOTOykaVbC4YylbOno7skRfeId9ALTuA\",\n        \"all\": {\n            \"_id\": \"668e6f54e55d0f7bca9b1044\",\n            \"username\": \"MartinRex\",\n            \"email\": \"martinirex@yahoo.co.uk\",\n            \"password\": \"$2a$10$GBWsAH1vksAA2wyg83LyGuDVknzyGn8IJfGHUDPXjxnB6eLDeW8Se\",\n            \"profession\": \"Mobile Developer (Android)\",\n            \"gender\": \"Male\",\n            \"firstname\": \"Martin\",\n            \"lastname\": \"Rex\",\n            \"createdAt\": \"2024-07-10T11:24:04.803Z\",\n            \"updatedAt\": \"2024-07-10T11:24:04.803Z\",\n            \"__v\": 0,\n            \"id\": \"668e6f54e55d0f7bca9b1044\"\n        }\n    }\n}"},{"id":"938219d3-be82-4966-8d26-7cae9f570b83","name":"Error 404 - Not Found","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"username\": \"AdamFor\",\n    \"email\": \"adam12@yahoo.co.uk\",\n    \"password\": \"adamforlor\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/auth/login"},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"39"},{"key":"ETag","value":"W/\"27-ke1w3hEbjSA3TxCs/KJFyZm7cDI\""},{"key":"Date","value":"Wed, 10 Jul 2024 17:36:31 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"error\": \"Unknown user. Please signup\"\n}"}],"_postman_id":"f3a7221e-9176-4f93-be33-8025832dece4"},{"name":"Logout","id":"952107ee-d13b-4978-9015-a62ef8c3288b","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:5000/api/auth/logout","description":"<h3 id=\"post-apiauthlogout\">POST /api/auth/logout</h3>\n<p>This endpoint is used to log out the authenticated user.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>No request body is required for this endpoint.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<p>The response for this request will be a JSON object with the following properties:</p>\n<ul>\n<li><p><code>status</code> (number): Indicates the status of the logout operation. A value of 0 indicates success.</p>\n</li>\n<li><p><code>message</code> (string): An optional message related to the logout operation.</p>\n</li>\n</ul>\n<p>Example response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": 200,\n    \"message\": \"You have been logged out successfully\"\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","auth","logout"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"76e08e66-d771-4e98-8750-24ad012c170e","name":"Logout 200 OK","originalRequest":{"method":"POST","header":[],"url":"http://localhost:5000/api/auth/logout"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"64"},{"key":"ETag","value":"W/\"40-jrCaOtI5g7BfmDqsXj/igdJ0MNI\""},{"key":"Date","value":"Wed, 10 Jul 2024 15:30:57 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": 200,\n    \"message\": \"You have been logged out successfully\"\n}"}],"_postman_id":"952107ee-d13b-4978-9015-a62ef8c3288b"}],"id":"b66fd0a1-4775-4044-972f-43d47f10a523","description":"<p>This are the Authentication and Authorization routes.</p>\n","_postman_id":"b66fd0a1-4775-4044-972f-43d47f10a523"},{"name":"Glub Posts","item":[{"name":"View A Post","id":"402de7e4-ce86-4cee-b9b4-4bc63c9e071f","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:5000/api/glub/:glubId","description":"<p>The API endpoint retrieves information about a specific \"glub\" identified by the provided \"glubId\".</p>\n<p>The response for this request can be documented as a JSON schema as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": true,\n    \"glub\": [\n        {\n            \"_id\": \"668e78acff769e5ad457e9f6\",\n            \"title\": \"The New Era of WEB 3 - Part 2\",\n            \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": [\n                {\n                    \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                    \"username\": \"MartinRex\"\n                }\n            ],\n            \"likes\": [\n                \"668e6f54e55d0f7bca9b1044\"\n            ],\n            \"comments\": [\n                {\n                    \"_id\": \"668e851f943e55d4e0a3b367\",\n                    \"body\": \"Web 3 new era comment is very good\",\n                    \"author\": \"668e6f54e55d0f7bca9b1044\"\n                },\n                {\n                    \"_id\": \"668e9203e8b2b7425876b884\",\n                    \"body\": \"Web 3 new era comment is very good\",\n                    \"author\": \"668e6f54e55d0f7bca9b1044\"\n                }\n            ]\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","glub",":glubId"],"host":["localhost"],"query":[],"variable":[{"id":"1d8c4f45-7076-40a2-afb4-0a7a0a5391ac","type":"any","value":"668e78acff769e5ad457e9f6","key":"glubId"}]}},"response":[{"id":"289b7561-6896-41f8-94a9-0cf546e2ec1c","name":"View A Post","originalRequest":{"method":"GET","header":[],"url":{"raw":"http://localhost:5000/api/glub/:glubId","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId"],"variable":[{"key":"glubId","value":"668e78acff769e5ad457e9f6"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"595"},{"key":"ETag","value":"W/\"253-GIPnzPwbVrrR8PEI8POYSpb9D3I\""},{"key":"Date","value":"Wed, 10 Jul 2024 14:34:06 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"glub\": [\n        {\n            \"_id\": \"668e78acff769e5ad457e9f6\",\n            \"title\": \"The New Era of WEB 3 - Part 2\",\n            \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": [\n                {\n                    \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                    \"username\": \"MartinRex\"\n                }\n            ],\n            \"likes\": [\n                \"668e6f54e55d0f7bca9b1044\"\n            ],\n            \"comments\": [\n                {\n                    \"_id\": \"668e851f943e55d4e0a3b367\",\n                    \"body\": \"Web 3 new era comment is very good\",\n                    \"author\": \"668e6f54e55d0f7bca9b1044\"\n                },\n                {\n                    \"_id\": \"668e9203e8b2b7425876b884\",\n                    \"body\": \"Web 3 new era comment is very good\",\n                    \"author\": \"668e6f54e55d0f7bca9b1044\"\n                }\n            ]\n        }\n    ]\n}"}],"_postman_id":"402de7e4-ce86-4cee-b9b4-4bc63c9e071f"},{"name":"Create Post","id":"19f6b864-0d6f-4e7e-a33f-eb79ebfce087","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"The Era of WEB 3 - Part 2\",\n    \"body\": \"This is part 2 of the post on the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n    \"author\": \"668e6f54e55d0f7bca9b1044\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/glub/post","description":"<p>The endpoint <code>http://localhost:5000/api/glub/post</code> is a POST request used to create a new glub. The request should include a JSON payload with the keys \"title\", \"body\", and \"author\".</p>\n<h3 id=\"request-body\">Request Body</h3>\n<ul>\n<li><p><code>title</code> (string, required): The title of the glub.</p>\n</li>\n<li><p><code>body</code> (string, required): The content/body of the glub.</p>\n</li>\n<li><p><code>author</code> (string, required): The author of the glub.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response will have a status code of 201 and a content type of <code>application/json</code>. Below is a JSON schema representing the response structure:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": true,\n    \"glub\": [\n        {\n            \"_id\": \"668e78acff769e5ad457e9f6\",\n            \"title\": \"The New Era of WEB 3 - Part 2\",\n            \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": [\n                {\n                    \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                    \"username\": \"MartinRex\"\n                }\n            ],\n            \"likes\": [\n                \"668e6f54e55d0f7bca9b1044\"\n            ],\n            \"comments\": [\n                {\n                    \"_id\": \"668e851f943e55d4e0a3b367\",\n                    \"body\": \"Web 3 new era comment is very good\",\n                    \"author\": \"668e6f54e55d0f7bca9b1044\"\n                },\n                {\n                    \"_id\": \"668e9203e8b2b7425876b884\",\n                    \"body\": \"Web 3 new era comment is very good\",\n                    \"author\": \"668e6f54e55d0f7bca9b1044\"\n                }\n            ]\n        }\n    ]\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","glub","post"],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"fcdb06f4-165f-4c39-945a-6045b627812e","name":"Create Post","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"The Era of WEB 3 - Part 2\",\n    \"body\": \"This is part 2 of the post on the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n    \"author\": \"668e6f54e55d0f7bca9b1044\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/glub/post"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"392"},{"key":"ETag","value":"W/\"188-bzzRke/Kni13mFw2KLTKrrUcCho\""},{"key":"Date","value":"Wed, 10 Jul 2024 15:59:36 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"The Era of WEB 3 - Part 2\",\n    \"body\": \"This is part 2 of the post on the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n    \"author\": \"668e6f54e55d0f7bca9b1044\",\n    \"comments\": [],\n    \"likes\": [],\n    \"_id\": \"668eafe8342ce99793fef663\",\n    \"createdAt\": \"2024-07-10T15:59:36.517Z\",\n    \"updatedAt\": \"2024-07-10T15:59:36.517Z\",\n    \"__v\": 0,\n    \"id\": \"668eafe8342ce99793fef663\"\n}"},{"id":"036e6010-0cbc-4932-b30e-1fd5a4a167ff","name":"Created 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"The Citadel of Hope\",\n    \"body\": \"This is the post on the Citadel of Hope Ministries. The Lord is good at all times.\",\n    \"author\": \"668e6f54e55d0f7bca9b1044\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/glub/post"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"335"},{"key":"ETag","value":"W/\"14f-NJjNsrLdt+h3Kdbl+6Sb5OopTqU\""},{"key":"Date","value":"Wed, 10 Jul 2024 16:54:33 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"title\": \"The Citadel of Hope\",\n    \"body\": \"This is the post on the Citadel of Hope Ministries. The Lord is good at all times.\",\n    \"author\": \"668e6f54e55d0f7bca9b1044\",\n    \"comments\": [],\n    \"likes\": [],\n    \"_id\": \"668ebcc99a870c1bfaff79d8\",\n    \"createdAt\": \"2024-07-10T16:54:33.555Z\",\n    \"updatedAt\": \"2024-07-10T16:54:33.555Z\",\n    \"__v\": 0,\n    \"id\": \"668ebcc99a870c1bfaff79d8\"\n}"}],"_postman_id":"19f6b864-0d6f-4e7e-a33f-eb79ebfce087"},{"name":"View All Posts","id":"b3513f19-2ea5-409c-a4e1-8c7f06cfd2e1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"GET","header":[],"url":"http://localhost:5000/api/glub/","description":"<p>This endpoint makes an HTTP GET request to retrieve a list of posts. The response will be in JSON format with a status field indicating the success of the request, and an array of posts containing their respective details such as ID, title, body, author, likes, dislikes, creation and update timestamps, and version.</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"status\": true,\n    \"posts\": [\n        {\n            \"_id\": \"66854bcbfc8cf80465d5aa76\",\n            \"title\": \"This the Title\",\n            \"body\": \"This is the body of the message\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": [\n                \"667c740f76b576893ca1cf7f\"\n            ],\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-03T13:02:03.993Z\",\n            \"updatedAt\": \"2024-07-07T11:35:17.596Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"66854d37d736aa3b1d98c1cf\",\n            \"title\": \"This is another post Title\",\n            \"body\": \"This is another body of a new message\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-03T13:08:07.708Z\",\n            \"updatedAt\": \"2024-07-03T13:08:07.708Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668899df7d605ab57f6eedb5\",\n            \"title\": \"A blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T01:11:59.732Z\",\n            \"updatedAt\": \"2024-07-06T01:11:59.732Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"66889a89ef26d11808ba7890\",\n            \"title\": \"A new post blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T01:14:49.282Z\",\n            \"updatedAt\": \"2024-07-06T01:14:49.282Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6688a0a0f476be8cc3c3d944\",\n            \"title\": \"A second new post blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T01:40:48.373Z\",\n            \"updatedAt\": \"2024-07-06T01:40:48.373Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6688a6907d830a623ceef789\",\n            \"title\": \"A is my third new post blog\",\n            \"body\": \"this is the new body\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T02:06:08.594Z\",\n            \"updatedAt\": \"2024-07-06T13:08:16.662Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6688d612f3ced0e327bd8621\",\n            \"title\": \"A third new post blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": [\n                \"667c740f76b576893ca1cf7f\"\n            ],\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T05:28:51.014Z\",\n            \"updatedAt\": \"2024-07-07T11:04:00.562Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e77cad3858f1da35bdeff\",\n            \"title\": \"The Era of WEB3\",\n            \"body\": \"This is the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [],\n            \"createdAt\": \"2024-07-10T12:00:10.909Z\",\n            \"updatedAt\": \"2024-07-10T12:00:10.909Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e781717dfe0b2d76f91a8\",\n            \"title\": \"The Era of WEB 3\",\n            \"body\": \"This is the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [],\n            \"createdAt\": \"2024-07-10T12:01:27.389Z\",\n            \"updatedAt\": \"2024-07-10T12:01:27.389Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e78515ac1c035b1d8b6bb\",\n            \"title\": \"The Era of WEB 3\",\n            \"body\": \"This is the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [],\n            \"createdAt\": \"2024-07-10T12:02:25.825Z\",\n            \"updatedAt\": \"2024-07-10T12:02:25.825Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e78acff769e5ad457e9f6\",\n            \"title\": \"The New Era of WEB 3 - Part 2\",\n            \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [\n                \"668e6f54e55d0f7bca9b1044\",\n                \"668ea1c4fe738b62ae847963\"\n            ],\n            \"createdAt\": \"2024-07-10T12:03:56.958Z\",\n            \"updatedAt\": \"2024-07-10T15:18:11.521Z\",\n            \"__v\": 0\n        }\n    ]\n}\n</code></pre>","urlObject":{"protocol":"http","port":"5000","path":["api","glub",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"233e8073-ad5c-4160-b068-5d0290d2515c","name":"View All Posts","originalRequest":{"method":"GET","header":[],"url":"http://localhost:5000/api/glub/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"3486"},{"key":"ETag","value":"W/\"d9e-w0wwuw+oJJA7wDA9fj8ndsr8+bA\""},{"key":"Date","value":"Wed, 10 Jul 2024 15:18:41 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": true,\n    \"posts\": [\n        {\n            \"_id\": \"66854bcbfc8cf80465d5aa76\",\n            \"title\": \"This the Title\",\n            \"body\": \"This is the body of the message\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": [\n                \"667c740f76b576893ca1cf7f\"\n            ],\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-03T13:02:03.993Z\",\n            \"updatedAt\": \"2024-07-07T11:35:17.596Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"66854d37d736aa3b1d98c1cf\",\n            \"title\": \"This is another post Title\",\n            \"body\": \"This is another body of a new message\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-03T13:08:07.708Z\",\n            \"updatedAt\": \"2024-07-03T13:08:07.708Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668899df7d605ab57f6eedb5\",\n            \"title\": \"A blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T01:11:59.732Z\",\n            \"updatedAt\": \"2024-07-06T01:11:59.732Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"66889a89ef26d11808ba7890\",\n            \"title\": \"A new post blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T01:14:49.282Z\",\n            \"updatedAt\": \"2024-07-06T01:14:49.282Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6688a0a0f476be8cc3c3d944\",\n            \"title\": \"A second new post blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T01:40:48.373Z\",\n            \"updatedAt\": \"2024-07-06T01:40:48.373Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6688a6907d830a623ceef789\",\n            \"title\": \"A is my third new post blog\",\n            \"body\": \"this is the new body\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": 0,\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T02:06:08.594Z\",\n            \"updatedAt\": \"2024-07-06T13:08:16.662Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"6688d612f3ced0e327bd8621\",\n            \"title\": \"A third new post blog\",\n            \"body\": \"This is the glub\",\n            \"author\": {\n                \"_id\": \"667c740f76b576893ca1cf7f\",\n                \"username\": \"Feyi\"\n            },\n            \"likes\": [\n                \"667c740f76b576893ca1cf7f\"\n            ],\n            \"dislikes\": 0,\n            \"createdAt\": \"2024-07-06T05:28:51.014Z\",\n            \"updatedAt\": \"2024-07-07T11:04:00.562Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e77cad3858f1da35bdeff\",\n            \"title\": \"The Era of WEB3\",\n            \"body\": \"This is the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [],\n            \"createdAt\": \"2024-07-10T12:00:10.909Z\",\n            \"updatedAt\": \"2024-07-10T12:00:10.909Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e781717dfe0b2d76f91a8\",\n            \"title\": \"The Era of WEB 3\",\n            \"body\": \"This is the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [],\n            \"createdAt\": \"2024-07-10T12:01:27.389Z\",\n            \"updatedAt\": \"2024-07-10T12:01:27.389Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e78515ac1c035b1d8b6bb\",\n            \"title\": \"The Era of WEB 3\",\n            \"body\": \"This is the era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [],\n            \"createdAt\": \"2024-07-10T12:02:25.825Z\",\n            \"updatedAt\": \"2024-07-10T12:02:25.825Z\",\n            \"__v\": 0\n        },\n        {\n            \"_id\": \"668e78acff769e5ad457e9f6\",\n            \"title\": \"The New Era of WEB 3 - Part 2\",\n            \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n            \"author\": {\n                \"_id\": \"668e6f54e55d0f7bca9b1044\",\n                \"username\": \"MartinRex\"\n            },\n            \"comments\": [],\n            \"likes\": [\n                \"668e6f54e55d0f7bca9b1044\",\n                \"668ea1c4fe738b62ae847963\"\n            ],\n            \"createdAt\": \"2024-07-10T12:03:56.958Z\",\n            \"updatedAt\": \"2024-07-10T15:18:11.521Z\",\n            \"__v\": 0\n        }\n    ]\n}"}],"_postman_id":"b3513f19-2ea5-409c-a4e1-8c7f06cfd2e1"},{"name":"Delete Post","id":"d0b89aef-6b97-483d-97ce-ccb552372e85","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"DELETE","header":[],"url":"http://localhost:5000/api/glub/:glubId","description":"<p>The API endpoint sends an HTTP DELETE request to <a href=\"http://localhost:5000/api/glub/:glubId/\">http://localhost:5000/api/glub/:glubId/</a> to delete a specific resource identified by the provided glubId. </p>\n<h3 id=\"response\">Response</h3>\n<p>The response returned is a JSON object with the following schema:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"status\": {\n            \"type\": \"string\"\n        },\n        \"message\": {\n            \"type\": \"string\"\n        }\n    }\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","glub",":glubId"],"host":["localhost"],"query":[],"variable":[{"id":"0d01a089-bd2e-4b41-a1a6-ed95dcc68eee","type":"any","value":"668e78acff769e5ad457e9f6","key":"glubId"}]}},"response":[{"id":"1dc4e4c1-ab84-49dc-be42-af1e0e97242a","name":"Not Found 404","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:5000/api/glub/:glubId/","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId",""],"variable":[{"key":"glubId","value":"668e77cad3858f1da35bdeff"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"58"},{"key":"ETag","value":"W/\"3a-N5ArMb4hukc+ZhoI+DKmgdzPcQs\""},{"key":"Date","value":"Wed, 10 Jul 2024 17:24:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"Fail\",\n    \"message\": \"Post with given Id not found\"\n}"},{"id":"30ca6fa5-f5e0-400f-a67c-bfd9f3983db9","name":"Deleted 200 OK","originalRequest":{"method":"DELETE","header":[],"url":{"raw":"http://localhost:5000/api/glub/:glubId/","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId",""],"variable":[{"key":"glubId","value":"668e781717dfe0b2d76f91a8"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"91"},{"key":"ETag","value":"W/\"5b-l5eGerF3qDPs3k1eJxN9r2NXsQk\""},{"key":"Date","value":"Wed, 10 Jul 2024 17:32:27 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"message\": \"Post with Id 668e781717dfe0b2d76f91a8 deleted successfully\"\n}"}],"_postman_id":"d0b89aef-6b97-483d-97ce-ccb552372e85"},{"name":"Update Post","id":"5bba2d32-a4e0-4c31-83b9-b649fb38e7a7","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"The New Era of WEB 3 - Part 2\",\n    \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/glub/:glubId","description":"<h3 id=\"update-glub\">Update Glub</h3>\n<p>This endpoint allows the user to update a Glub by providing the Glub ID in the URL path.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>title</code> (string, optional): The title of the Glub.</p>\n</li>\n<li><p><code>body</code> (string, optional): The body content of the Glub.</p>\n</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p>Status: 200</p>\n</li>\n<li><p>Content-Type: application/json</p>\n</li>\n</ul>\n<p>Example Response:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"\",\n    \"post\": {\n        \"_id\": \"\",\n        \"title\": \"\",\n        \"body\": \"\",\n        \"author\": \"\",\n        \"comments\": [],\n        \"likes\": [],\n        \"createdAt\": \"\",\n        \"updatedAt\": \"\",\n        \"__v\": 0,\n        \"id\": \"\"\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","glub",":glubId"],"host":["localhost"],"query":[],"variable":[{"id":"8c133d9d-dee3-471d-9d4c-43477ed04c92","type":"any","value":"668e78acff769e5ad457e9f6","key":"glubId"}]}},"response":[{"id":"dc36a61a-27c3-444b-8d3e-9ec1d0a54da1","name":"Failed (Not Author) - 404","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"The New Era of WEB 3 - Part 2\",\n    \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:5000/api/glub/:glubId","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId"],"variable":[{"key":"glubId","value":"668e78acff769e5ad457e9f6"}]}},"status":"Not Found","code":404,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"57"},{"key":"ETag","value":"W/\"39-w5rq3FH6IE7FEP+MY9nQceu4Fjg\""},{"key":"Date","value":"Wed, 10 Jul 2024 16:24:33 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"Fail\",\n    \"message\": \"Only Author can update post\"\n}"},{"id":"a4d039c9-c8f3-4ed3-95d0-a693780d3252","name":"Updated 200","originalRequest":{"method":"PUT","header":[],"body":{"mode":"raw","raw":"{\n    \"title\": \"The Citadel of Hope\",\n    \"body\": \"This is the post on the Citadel of Hope Ministries. The Lord is good at all times. We will keep up the work of God.\"\n}","options":{"raw":{"language":"json"}}},"url":{"raw":"http://localhost:5000/api/glub/:glubId","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId"],"variable":[{"key":"glubId","value":"668ebcc99a870c1bfaff79d8"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"396"},{"key":"ETag","value":"W/\"18c-a3aoSdIZoy6n49RECuspuL94/j4\""},{"key":"Date","value":"Wed, 10 Jul 2024 17:12:39 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"post\": {\n        \"_id\": \"668ebcc99a870c1bfaff79d8\",\n        \"title\": \"The Citadel of Hope\",\n        \"body\": \"This is the post on the Citadel of Hope Ministries. The Lord is good at all times. We will keep up the work of God.\",\n        \"author\": \"668e6f54e55d0f7bca9b1044\",\n        \"comments\": [],\n        \"likes\": [],\n        \"createdAt\": \"2024-07-10T16:54:33.555Z\",\n        \"updatedAt\": \"2024-07-10T17:12:39.708Z\",\n        \"__v\": 0,\n        \"id\": \"668ebcc99a870c1bfaff79d8\"\n    }\n}"}],"_postman_id":"5bba2d32-a4e0-4c31-83b9-b649fb38e7a7"},{"name":"Like Post","id":"5abb793e-8e05-4318-8539-a07a43fa39d3","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:5000/api/glub/:glubId/like","description":"<h3 id=\"post-apiglubglubidlike\">POST /api/glub/:glubId/like</h3>\n<p>This endpoint is used to like a specific post within a glub.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>No request body parameters are required for this endpoint.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li>Status: 200</li>\n<li>Content-Type: application/json</li>\n</ul>\n<p>Example Response Body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"\",\n    \"post\": {\n        \"_id\": \"\",\n        \"title\": \"\",\n        \"body\": \"\",\n        \"author\": \"\",\n        \"comments\": [],\n        \"likes\": [\"\"],\n        \"createdAt\": \"\",\n        \"updatedAt\": \"\",\n        \"__v\": 0,\n        \"id\": \"\"\n    }\n}\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","glub",":glubId","like"],"host":["localhost"],"query":[],"variable":[{"id":"327e0593-cd6d-47e9-8e35-93bff9595856","type":"any","value":"668e78acff769e5ad457e9f6","key":"glubId"}]}},"response":[{"id":"32c98eba-f4fe-411f-8414-93b169301885","name":"200 OK","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://localhost:5000/api/glub/:glubId/like","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId","like"],"variable":[{"key":"glubId","value":"668e78acff769e5ad457e9f6"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"481"},{"key":"ETag","value":"W/\"1e1-fawZmd5uMLyE6AomCO4qXM/HQHU\""},{"key":"Date","value":"Wed, 10 Jul 2024 15:18:11 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"post\": {\n        \"_id\": \"668e78acff769e5ad457e9f6\",\n        \"title\": \"The New Era of WEB 3 - Part 2\",\n        \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n        \"author\": \"668e6f54e55d0f7bca9b1044\",\n        \"comments\": [],\n        \"likes\": [\n            \"668e6f54e55d0f7bca9b1044\",\n            \"668ea1c4fe738b62ae847963\"\n        ],\n        \"createdAt\": \"2024-07-10T12:03:56.958Z\",\n        \"updatedAt\": \"2024-07-10T15:18:11.521Z\",\n        \"__v\": 0,\n        \"id\": \"668e78acff769e5ad457e9f6\"\n    }\n}"}],"_postman_id":"5abb793e-8e05-4318-8539-a07a43fa39d3"},{"name":"Unlike Post","id":"72d69741-7630-4f16-8fdc-9f2f9c2e22b1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"url":"http://localhost:5000/api/glub/:glubId/dislike","description":"<h3 id=\"add-dislike-to-post\">Add Dislike to Post</h3>\n<p>The endpoint allows users to add a dislike to a specific post by providing the post ID.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li>No request body parameters required.</li>\n</ul>\n<h4 id=\"response\">Response</h4>\n<ul>\n<li><p><strong>status</strong> (string) - The status of the response.</p>\n</li>\n<li><p><strong>post</strong> (object) - Details of the post with the following properties:</p>\n<ul>\n<li><p><strong>_id</strong> (string) - The unique identifier of the post.</p>\n</li>\n<li><p><strong>title</strong> (string) - The title of the post.</p>\n</li>\n<li><p><strong>body</strong> (string) - The content/body of the post.</p>\n</li>\n<li><p><strong>author</strong> (string) - The author of the post.</p>\n</li>\n<li><p><strong>comments</strong> (array) - Array of comments on the post.</p>\n</li>\n<li><p><strong>likes</strong> (array) - Array of users who liked the post.</p>\n</li>\n<li><p><strong>createdAt</strong> (string) - The timestamp of post creation.</p>\n</li>\n<li><p><strong>updatedAt</strong> (string) - The timestamp of the post's last update.</p>\n</li>\n<li><p><strong>__v</strong> (number) - Version control for the post.</p>\n</li>\n<li><p><strong>id</strong> (string) - The ID of the post.</p>\n</li>\n</ul>\n</li>\n</ul>\n<h4 id=\"example-response\">Example Response</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"status\": \"success\",\n    \"post\": {\n        \"_id\": \"668e78acff769e5ad457e9f6\",\n        \"title\": \"The New Era of WEB 3 - Part 2\",\n        \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n        \"author\": \"668e6f54e55d0f7bca9b1044\",\n        \"comments\": [],\n        \"likes\": [\n            \"668e6f54e55d0f7bca9b1044\"\n        ],\n        \"createdAt\": \"2024-07-10T12:03:56.958Z\",\n        \"updatedAt\": \"2024-07-10T15:23:21.802Z\",\n        \"__v\": 0,\n        \"id\": \"668e78acff769e5ad457e9f6\"\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","glub",":glubId","dislike"],"host":["localhost"],"query":[],"variable":[{"id":"a7492dc4-b235-4cc2-b8ba-4ed8ce74b130","type":"any","value":"668e78acff769e5ad457e9f6","key":"glubId"}]}},"response":[{"id":"defec2e3-87dc-4c24-a658-99ce83154888","name":"200 OK","originalRequest":{"method":"POST","header":[],"url":{"raw":"http://localhost:5000/api/glub/:glubId/dislike","protocol":"http","host":["localhost"],"port":"5000","path":["api","glub",":glubId","dislike"],"variable":[{"key":"glubId","value":"668e78acff769e5ad457e9f6"}]}},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"454"},{"key":"ETag","value":"W/\"1c6-olv6Eq3qJQKdJRVpp9pCYWEd/dc\""},{"key":"Date","value":"Wed, 10 Jul 2024 15:23:22 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"success\",\n    \"post\": {\n        \"_id\": \"668e78acff769e5ad457e9f6\",\n        \"title\": \"The New Era of WEB 3 - Part 2\",\n        \"body\": \"This is part 2 of the post on the new era of Web 3 technologies. Crypto currency has been a great contribution to the popularity of Web 3\",\n        \"author\": \"668e6f54e55d0f7bca9b1044\",\n        \"comments\": [],\n        \"likes\": [\n            \"668e6f54e55d0f7bca9b1044\"\n        ],\n        \"createdAt\": \"2024-07-10T12:03:56.958Z\",\n        \"updatedAt\": \"2024-07-10T15:23:21.802Z\",\n        \"__v\": 0,\n        \"id\": \"668e78acff769e5ad457e9f6\"\n    }\n}"}],"_postman_id":"72d69741-7630-4f16-8fdc-9f2f9c2e22b1"},{"name":"Add Comments","id":"c7c3a5ff-e063-4f3d-a0d0-52b0b29891c1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"body\": \"Web 3 new era comment is very good\",\n    \"author\": \"667c740f76b576893ca1cf7f\",\n    \"glub\": \"668e78acff769e5ad457e9f6\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/comment/","description":"<p>The endpoint allows you to create a new comment via an HTTP POST request to <a href=\"http://localhost:5000/api/comment/\">http://localhost:5000/api/comment/</a>. The request should include a JSON payload in the raw request body type, with keys for \"body\" and \"glub\". Upon successful execution, the response will have a status code of 201 and a Content-Type of application/json. The response body will contain the newly created comment object under the \"comment\" key, along with a \"success\" boolean value. The \"comment\" object will include details such as the comment's body, author, unique identifier, creation and update timestamps, and version. Here's an example of the response body:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"comment\": {\n        \"body\": \"Web 3 new era comment is very good\",\n        \"author\": \"668e6f54e55d0f7bca9b1044\",\n        \"glub\": \"668e78acff769e5ad457e9f6\",\n        \"_id\": \"668e9203e8b2b7425876b884\",\n        \"createdAt\": \"2024-07-10T13:52:03.421Z\",\n        \"updatedAt\": \"2024-07-10T13:52:03.421Z\",\n        \"__v\": 0,\n        \"id\": \"668e9203e8b2b7425876b884\"\n    },\n    \"success\": true\n}\n\n</code></pre>\n","urlObject":{"protocol":"http","port":"5000","path":["api","comment",""],"host":["localhost"],"query":[],"variable":[]}},"response":[{"id":"1ce1a956-2dd3-4825-9b61-72d8663228ae","name":"Created 201","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"body\": \"Web 3 new era comment is very good\",\n    \"glub\": \"668e78acff769e5ad457e9f6\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/comment/"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"293"},{"key":"ETag","value":"W/\"125-kNLLEsWg6thtGXcXylruBpQTwfA\""},{"key":"Date","value":"Wed, 10 Jul 2024 13:52:03 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"comment\": {\n        \"body\": \"Web 3 new era comment is very good\",\n        \"author\": \"668e6f54e55d0f7bca9b1044\",\n        \"glub\": \"668e78acff769e5ad457e9f6\",\n        \"_id\": \"668e9203e8b2b7425876b884\",\n        \"createdAt\": \"2024-07-10T13:52:03.421Z\",\n        \"updatedAt\": \"2024-07-10T13:52:03.421Z\",\n        \"__v\": 0,\n        \"id\": \"668e9203e8b2b7425876b884\"\n    },\n    \"success\": true\n}"},{"id":"cc91d678-af7f-4d41-b0d9-60bfb3fbb367","name":"Failed  (Post not found - 404","originalRequest":{"method":"POST","header":[],"body":{"mode":"raw","raw":"{\n    \"body\": \"Web 3 new era comment is very good\",\n    \"glub\": \"668e78acff769e5ad457e9f6\"\n}","options":{"raw":{"language":"json"}}},"url":"http://localhost:5000/api/comment/"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"X-Powered-By","value":"Express"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Content-Length","value":"44"},{"key":"ETag","value":"W/\"2c-9yDfbDywp1SHgPlq20/4Rr2fSsA\""},{"key":"Date","value":"Thu, 11 Jul 2024 17:26:18 GMT"},{"key":"Connection","value":"keep-alive"},{"key":"Keep-Alive","value":"timeout=5"}],"cookie":[],"responseTime":null,"body":"{\n    \"status\": \"Fail\",\n    \"message\": \"Post not found\"\n}"}],"_postman_id":"c7c3a5ff-e063-4f3d-a0d0-52b0b29891c1"}],"id":"19972d13-e4dd-4ee8-9e93-a3e7bd6ab1cb","description":"<p>This are the endpoints for creating, reading, updating and deleting Posts. You can also add comments to posts and likes.</p>\n","_postman_id":"19972d13-e4dd-4ee8-9e93-a3e7bd6ab1cb"}]}