Categorygithub.com/Be1chenok/zeroAgencyTask
module
0.0.0-20231221213806-9cb84bcd22fd
Repository: https://github.com/be1chenok/zeroagencytask.git
Documentation: pkg.go.dev

# README

Zero Agency Task

Go Reference

Clone the project

$ git clone https://github.com/Be1chenok/zeroAgencyTask
$ cd zeroAgencyTask

Launch a project

$ make run

If it starts up for the first time

Execute migrations

$ make migrate-up
$ make migrate-down

Logs

go.uber.org/zap

API server provides the following endpoints:

  • POST /register - registration

Example body

{
  "Email":"[email protected]",
  "Username":"user",
  "Password":"userpass"
}
  • POST /login - sigIn

Example body

{
  "Username":"user",
  "Password":"userpass"
}
  • GET /logout - logout need access token

  • GET /refresh - refresh token need refresh token

  • GET /fullLogout - full logout neen access token

  • POST /edit/:id - edit news

Example body

{
  "Id": 64,
  "Title": "Lorem ipsum",
  "Content": "Dolor sit amet <b>foo</b>",
  "Categories": [1,2,3]
}
  • GET /list - get news list (default 10 elements)
Pagination:
/list?page=2&size=15

# Packages

No description provided by the author
No description provided by the author