Skip to content

Backend Goodnews with Spring boot, Postgresql, Spring Security and Jwt;

Notifications You must be signed in to change notification settings

JorgeluizAndrade/Goodnews-Backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Goodnews-Backend

This document outlines the API endpoints for the Goodnews backend, a project focused on the Gospel.

Supported Methods:

  • POST
  • GET
  • DELETE
  • PUT

Base URL:

http://localhost:8080/api/

Authentication:

Certain endpoints require authorization using a Bearer token. The token itself is not provided here, but denoted by <token>.

User Management

Register User (POST):

{
  "name":"Jorge",
  "lastname":"Andrade",  
  "email":"jorge1718@gmail.com",
  "password":"1234",
  "role":"ADMIN"
}

Login User (POST):

{
  "email":"jorge1718@gmail.com",
    "password":"1234"
}

Get User Information (GET):

Get User by ID (GET):

Update User Information (PUT):

{
  "name":"Jorge Luiz",
  "lastname":"Andrade"
}

Delete User (DELETE):

Post Management

Create Post (POST):

{
  "title": "Jesus é o Caminho",
  "text": "O Verbo que se fez carne veio ao mundo, não para codenar o mundo, mas para que seja salvo por Ele.",
  "user": {
    "id": "2e612609-358d-4642-a850-d0c062722fe8"
  }
}

Get All Posts (GET):

Get Post by ID (GET):

Delete Post (DELETE):

Update Post (PUT):

{
  "title": "Jesus é a vida",
  "text": "Santo, Santo, Santo é o Senhor!",
  "user": {
    "id": "{userId}"
  }
}

Releases

No releases published

Packages

No packages published