luispfcanales / inventory-oti

web app computers inventory UNAMAD

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GO inventory application OTI

Hi! this is inventory application using dessign pattern MVC

Requirements to run project

Run project

Execute project with next commands:

$ go mod tidy
$ go run .

API Reference

Token by header Authorization

Key Value
Authorization Bearer eyJhbGciOiJIUzI1NiIsInR5...
fetch(url, {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + token,
    'Content-Type': 'application/json',
  },
})

Login application

  POST /login
  {
	"email":"luispfcanales@gmail.com",
	"password":"1234"
  }
Parameter Type Description
email string Required
password string Required

  • Api users

  GET /api/users/all

  • Api networks

  GET /api/network/all
  GET /api/network/all/resume

  • Api Person

  GET /api/person/:dni
Parameter Type Description
dni int Required. DNI of item to fetch
  GET /api/person/all
PUT /api/person/
{
	"dni":72453560,
	"first_name":"LUIS ANGEL",
	"last_name":"PFUÑO CANALES",
	"birthdate":"2023-12-14T22:52:13.202Z",
	"address":"JR TEST 222"
}
Parameter Type Description
dni string Required. DNI to update
first_name string Required
last_name string Required
birthdate string Required
address string Required
POST /api/person
{
	"dni":72453560,
	"first_name":"LUIS ANGEL",
	"last_name":"PFUÑO CANALES",
	"birthdate":"2023-12-14T22:52:13.202Z",
	"address":"JR TEST 222"
}
  DELETE /api/person/:dni
Parameter Type Description
dni int Required. DNI to delete

  • Api campus

  GET /api/campus/:id
  GET /api/campus/all
PUT /api/campus
{
	"id":"a468a765-932d-49b5-8090-4dfddfrb37a2",
	"abbreviation":"test",
	"name":"put testing",
	"address":"updating",
	"state":false
}
POST /api/campus
{
	"abbreviation":"test",
	"name":"put testing",
	"address":"updating",
	"state":false
}
  DELETE /api/campus/id

  • Api zone

  GET /api/zone/:id
  GET /api/zone/all

About

web app computers inventory UNAMAD


Languages

Language:Go 51.5%Language:HTML 35.9%Language:JavaScript 12.1%Language:Makefile 0.2%Language:Shell 0.2%Language:CSS 0.1%