package routes

import (
	"gitlab.com/pactual1/backend/controllers"

	"github.com/gin-gonic/gin"
)

func RegisterPublicRoutes(r *gin.Engine) {

	// Map dashboard
	r.GET("/dashboard/map/contract/devices", controllers.GetDevicesByContract)
	r.GET("/dashboard/map/contracts", controllers.GetLatestContracts)
	r.GET("/dashboard/map/device_data", controllers.GetDeviceData)

	// Invoices
	r.GET("/invoices", controllers.GetInvoices)
	r.GET("/invoice/:id", controllers.GetInvoiceByID) 

	r.POST("/device_data/save", controllers.SaveDeviceInfo)
	r.GET("/buyers/", controllers.ListBuyers)
	r.GET("/product_templates/", controllers.ListProductTemplates)
	r.GET("/text_templates/", controllers.ListTextTemplates)
	r.POST("/text_templates/save", controllers.CreateTextTemplate)
	r.GET("/product_templates/:template_id", controllers.GetProductTemplate)
	
}
