- Organisational News Portal is a REST API for querying and retrieving scoped news and information. There should be news/articles/posts that are available to all employees without navigating into any department, and others that are housed/classified within departments.
- java
- git
- postman
- postgresql
- gradle
git clone https://github.com/david8203/workOrganisationalPortal.git open in intellij or your preferred IDE.
- and
gradle run
Ensure you have posgresql
installed Run the following commands to create your database:
input the command psql <create.sql
in your terminal to create the databases
input the command psql <drop.sql
in your terminal to DROP the databases
Test links in App in postman. Make sure java gradle,postman extension postgresql is installed
Change database creadentials to your credentials in the App.java and in the tests
URL | HTTP VERB | DESCRIPTION |
---|---|---|
/add/user/:user_id/department/:department_id | POST | Add new Users to specific department |
/news/new/department | POST | Adding News to a Department |
/news/new/general | POST | Adding General News |
/users | GET | Display all users |
/departments | GET | Display all Departments |
/news/general | GET | Display all general news |
/user/:id/departments | GET | Get specific user in a department |
/user/:id | GET | Get a specific user |
/department/:id/users | GET | Get users in a specific department |
/department/:id | GET | gets a specific department |
/news/department/:id | GET | gets news from a specific department |
Creating user { "name":"David" "position":"Manager", "staff_role":"Editor" }
Creating Departments { "name":"Editing", "description":"Editing of books" }
Creating **General News { "title":"Meeting", "description":"Discussion about expanding", "user_id":1 }
creating Department News
{ "title":"Meeting", "description":"Discussion about expanding", "department_id":1, "user_id":1 }
This project is licensed under the MIT Open Source license Copyright (c) 2022. LICENCE