Skip to content

Be1chenok/zeroAgencyTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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":"user@user.go",
  "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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages