Merge branch 'get-contracts-for-buyers' into 'main'
Contracts for buyer See merge request ukacorp/mesari/backend!15
This commit was merged in pull request #15.
This commit is contained in:
@@ -73,7 +73,7 @@ func GetLatestContracts(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch contracts
|
// Fetch contracts
|
||||||
contracts, total, st, err := contract.GetContracts(status, companyName, companyAddress, companyEmail, companyPhone, startTime, endTime, contractName, deviceIDs, limit, offset)
|
contracts, total, st, err := contract.GetContracts(status, companyName, companyAddress, companyEmail, companyPhone, &startTime, &endTime, contractName, deviceIDs, 0, nil, limit, offset)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
c.JSON(st, gin.H{"error": err.Error()})
|
c.JSON(st, gin.H{"error": err.Error()})
|
||||||
@@ -81,6 +81,100 @@ func GetLatestContracts(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Respond with the contracts and the total count
|
// Respond with the contracts and the total count
|
||||||
c.JSON(http.StatusOK, gin.H{"total": total, "contracts": contracts})
|
c.JSON(http.StatusOK, gin.H{"total": total, "data": contracts})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func GetBuyerContracts(c *gin.Context) {
|
||||||
|
// Existing parameters
|
||||||
|
limitStr := c.DefaultQuery("limit", "50")
|
||||||
|
offsetStr := c.DefaultQuery("offset", "0")
|
||||||
|
status := c.Query("status")
|
||||||
|
|
||||||
|
contractIDStr := c.DefaultQuery("contract_id","0")
|
||||||
|
dateCreatedStr := c.Query("date_created")
|
||||||
|
|
||||||
|
|
||||||
|
// Convert limit and offset to int
|
||||||
|
limit, err := strconv.Atoi(limitStr)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid limit value"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
offset, err := strconv.Atoi(offsetStr)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid offset value"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert limit and offset to int
|
||||||
|
contractID, err := strconv.Atoi(contractIDStr)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid contractID value"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Convert startTime to time.Time
|
||||||
|
var dateCreated time.Time
|
||||||
|
if dateCreatedStr != "" {
|
||||||
|
startTimeUnix, err := strconv.ParseInt(dateCreatedStr, 10, 64)
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid start_time value"})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
dateCreated = time.Unix(startTimeUnix, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Fetch contracts
|
||||||
|
contracts, total, st, err := contract.GetContracts(status, "", "", "", "", nil, nil, "", nil, contractID, &dateCreated, limit, offset)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
c.JSON(st, gin.H{"error": err.Error()})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Respond with the contracts and the total count
|
||||||
|
c.JSON(http.StatusOK, gin.H{"total": total, "data": convertContractToResponseModel(contracts)})
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetContractStatuses(c *gin.Context) {
|
||||||
|
|
||||||
|
// Respond with the contract statuses
|
||||||
|
c.JSON(http.StatusOK, gin.H{"data": models.GetContractStatuses()})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func convertContractToResponseModel(contracts []models.Contract) []models.ListContractResponse {
|
||||||
|
var listInvoiceResponses []models.ListContractResponse
|
||||||
|
|
||||||
|
// Get all statuses
|
||||||
|
statuses := models.GetContractStatuses()
|
||||||
|
statusMap := make(map[string]models.Status)
|
||||||
|
for _, s := range statuses {
|
||||||
|
statusMap[s.Value] = s
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, contract := range contracts {
|
||||||
|
// Get the status based on Value in the DB
|
||||||
|
status, ok := statusMap[contract.Status]
|
||||||
|
if !ok {
|
||||||
|
status = models.Status{Key: "Unknown", Value: "unknown"}
|
||||||
|
}
|
||||||
|
|
||||||
|
listInvoiceResponse := models.ListContractResponse{
|
||||||
|
Status: models.KeyValue{Key: status.Key, Value: status.Value},
|
||||||
|
Buyer: models.CompanyShortResponse{ID: int(contract.BuyerID), Name: contract.BuyerName},
|
||||||
|
ContractID: int(contract.ID),
|
||||||
|
DateCreated: contract.CreatedAt,
|
||||||
|
NumberOfDevices: contract.NumberOfDevices,
|
||||||
|
}
|
||||||
|
listInvoiceResponses = append(listInvoiceResponses, listInvoiceResponse)
|
||||||
|
}
|
||||||
|
return listInvoiceResponses
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -133,7 +133,7 @@ func GetDeviceData(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Respond with the GeoJSON feature collection
|
// Respond with the GeoJSON feature collection
|
||||||
c.JSON(http.StatusOK, featureCollection)
|
c.JSON(http.StatusOK, gin.H{"data": featureCollection})
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetDevicesByContract(c *gin.Context) {
|
func GetDevicesByContract(c *gin.Context) {
|
||||||
@@ -161,5 +161,5 @@ func GetDevicesByContract(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
// Respond with the devices
|
// Respond with the devices
|
||||||
c.JSON(http.StatusOK, devices)
|
c.JSON(http.StatusOK,gin.H{"data" : devices})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import (
|
|||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"gitlab.com/pactual1/backend/database/invoice"
|
"gitlab.com/pactual1/backend/database/invoice"
|
||||||
|
"gitlab.com/pactual1/backend/models"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetInvoices(c *gin.Context) {
|
func GetInvoices(c *gin.Context) {
|
||||||
@@ -32,7 +33,10 @@ func GetInvoices(c *gin.Context) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
c.JSON(http.StatusOK, gin.H{"total": total, "invoices": invoices})
|
// Convert to ListInvoiceResponse type
|
||||||
|
listInvoiceResponses := convertToResponseModel(invoices)
|
||||||
|
|
||||||
|
c.JSON(http.StatusOK, gin.H{"total": total, "data": listInvoiceResponses})
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetInvoiceByID(c *gin.Context) {
|
func GetInvoiceByID(c *gin.Context) {
|
||||||
@@ -50,9 +54,42 @@ func GetInvoiceByID(c *gin.Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if len(invoices) > 0 {
|
if len(invoices) > 0 {
|
||||||
c.JSON(http.StatusOK, gin.H{"invoice": invoices[0]})
|
c.JSON(http.StatusOK, gin.H{"data": invoices[0]})
|
||||||
} else {
|
} else {
|
||||||
c.JSON(http.StatusNotFound, gin.H{"error": "Invoice not found"})
|
c.JSON(http.StatusNotFound, gin.H{"error": "Invoice not found"})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func convertToResponseModel(invoices []models.Invoice) []models.ListInvoiceResponse {
|
||||||
|
var listInvoiceResponses []models.ListInvoiceResponse
|
||||||
|
|
||||||
|
// Get all statuses
|
||||||
|
statuses := models.GetInvoiceStatuses()
|
||||||
|
statusMap := make(map[string]models.Status)
|
||||||
|
for _, s := range statuses {
|
||||||
|
statusMap[s.Value] = s
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, invoice := range invoices {
|
||||||
|
// Get the status based on Value in the DB
|
||||||
|
status, ok := statusMap[invoice.Status]
|
||||||
|
if !ok {
|
||||||
|
status = models.Status{Key: "Unknown", Value: "unknown"}
|
||||||
|
}
|
||||||
|
|
||||||
|
listInvoiceResponse := models.ListInvoiceResponse{
|
||||||
|
Status: models.KeyValue{Key: status.Key, Value: status.Value},
|
||||||
|
Buyer: models.CompanyShortResponse{ID: int(invoice.BuyerID), Name: invoice.BuyerName},
|
||||||
|
ContractID: int(invoice.ContractID),
|
||||||
|
DateCreated: invoice.InvoiceDate,
|
||||||
|
DueDate: invoice.InvoiceDueDate,
|
||||||
|
Amount: strconv.FormatInt(invoice.PriceCents, 10),
|
||||||
|
}
|
||||||
|
listInvoiceResponses = append(listInvoiceResponses, listInvoiceResponse)
|
||||||
|
}
|
||||||
|
return listInvoiceResponses
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -12,87 +12,103 @@ import (
|
|||||||
"gitlab.com/pactual1/backend/shared"
|
"gitlab.com/pactual1/backend/shared"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetContracts(status string, companyName string, companyAddress string,
|
|
||||||
companyEmail string, companyPhone string, startTime time.Time, endTime time.Time,
|
|
||||||
contractName string, deviceIDs []int64, limit, offset int) ([]models.Contract, int64, int, error) {
|
|
||||||
var contracts []models.Contract
|
|
||||||
db := shared.GetDb()
|
|
||||||
|
|
||||||
countDb := db
|
func GetContracts(status string, companyName string, companyAddress string,
|
||||||
|
companyEmail string, companyPhone string, startTime *time.Time, endTime *time.Time,
|
||||||
|
contractName string, deviceIDs []int64, contractID int, dateCreated *time.Time, limit, offset int) ([]models.Contract, int64, int, error) {
|
||||||
|
|
||||||
// Search by Status
|
var contracts []models.Contract
|
||||||
if status != "" {
|
db := shared.GetDb()
|
||||||
db = shared.GetDb().Where("contracts.status = ?", status)
|
countDb := db
|
||||||
countDb = countDb.Where("contracts.status = ?", status)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search by Company Fields
|
// Define custom fields to be selected, varies based on joined tables
|
||||||
if companyName != "" || companyAddress != "" || companyEmail != "" || companyPhone != "" {
|
customFields := "contracts.*, array_length(contracts.device_ids, 1) as number_of_devices"
|
||||||
db = db.Joins("left join companies on companies.id = contracts.buyer_id")
|
|
||||||
countDb = countDb.Joins("left join companies on companies.id = contracts.buyer_id")
|
|
||||||
|
|
||||||
if companyName != "" {
|
// Search by Status
|
||||||
db = db.Where("companies.name LIKE ?", "%"+companyName+"%")
|
if status != "" {
|
||||||
countDb = countDb.Where("companies.name LIKE ?", "%"+companyName+"%")
|
db = db.Where("contracts.status = ?", status)
|
||||||
}
|
countDb = countDb.Where("contracts.status = ?", status)
|
||||||
|
}
|
||||||
|
|
||||||
if companyAddress != "" {
|
// Search by Company Fields
|
||||||
db = db.Where("companies.address LIKE ?", "%"+companyAddress+"%")
|
db = db.Joins("left join companies on companies.id = contracts.buyer_id")
|
||||||
countDb = countDb.Where("companies.address LIKE ?", "%"+companyAddress+"%")
|
countDb = countDb.Joins("left join companies on companies.id = contracts.buyer_id")
|
||||||
}
|
customFields += ", companies.name as buyer_name"
|
||||||
|
if companyName != "" {
|
||||||
|
db = db.Where("companies.name LIKE ?", "%"+companyName+"%")
|
||||||
|
countDb = countDb.Where("companies.name LIKE ?", "%"+companyName+"%")
|
||||||
|
}
|
||||||
|
if companyAddress != "" {
|
||||||
|
db = db.Where("companies.address LIKE ?", "%"+companyAddress+"%")
|
||||||
|
countDb = countDb.Where("companies.address LIKE ?", "%"+companyAddress+"%")
|
||||||
|
}
|
||||||
|
if companyEmail != "" {
|
||||||
|
db = db.Where("companies.email LIKE ?", "%"+companyEmail+"%")
|
||||||
|
countDb = countDb.Where("companies.email LIKE ?", "%"+companyEmail+"%")
|
||||||
|
}
|
||||||
|
if companyPhone != "" {
|
||||||
|
db = db.Where("companies.phone LIKE ?", "%"+companyPhone+"%")
|
||||||
|
countDb = countDb.Where("companies.phone LIKE ?", "%"+companyPhone+"%")
|
||||||
|
}
|
||||||
|
|
||||||
if companyEmail != "" {
|
// Search by Contract Name
|
||||||
db = db.Where("companies.email LIKE ?", "%"+companyEmail+"%")
|
|
||||||
countDb = countDb.Where("companies.email LIKE ?", "%"+companyEmail+"%")
|
|
||||||
}
|
|
||||||
|
|
||||||
if companyPhone != "" {
|
|
||||||
db = db.Where("companies.phone LIKE ?", "%"+companyPhone+"%")
|
|
||||||
countDb = countDb.Where("companies.phone LIKE ?", "%"+companyPhone+"%")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Search by Contract Name
|
|
||||||
if contractName != "" {
|
if contractName != "" {
|
||||||
db = db.Where("contracts.name LIKE ?", "%"+contractName+"%")
|
db = db.Where("contracts.name LIKE ?", "%"+contractName+"%")
|
||||||
countDb = countDb.Where("contracts.name LIKE ?", "%"+contractName+"%")
|
countDb = countDb.Where("contracts.name LIKE ?", "%"+contractName+"%")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search by Start Time
|
// Search by Contract Name
|
||||||
if !startTime.IsZero() {
|
if contractID != 0{
|
||||||
db = db.Where("start_time >= ?", startTime)
|
db = db.Where("contracts.id = ?", contractID)
|
||||||
countDb = countDb.Where("start_time >= ?", startTime)
|
countDb = countDb.Where("contracts.id = ?", contractID)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search by End Time
|
// Search by Start Time and End Time
|
||||||
if !endTime.IsZero() {
|
if startTime != nil &&!startTime.IsZero() {
|
||||||
db = db.Where("end_time <= ?", endTime)
|
db = db.Where("start_time >= ?", startTime)
|
||||||
countDb = countDb.Where("end_time <= ?", endTime)
|
countDb = countDb.Where("start_time >= ?", startTime)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Search by Device IDs
|
if endTime != nil && !startTime.IsZero() {
|
||||||
if len(deviceIDs) > 0 {
|
db = db.Where("end_time <= ?", endTime)
|
||||||
|
countDb = countDb.Where("end_time <= ?", endTime)
|
||||||
|
}
|
||||||
|
|
||||||
|
if dateCreated != nil && !dateCreated.IsZero() {
|
||||||
|
db = db.Where("contracts.created_at = ?", dateCreated)
|
||||||
|
countDb = countDb.Where("created_at = ?", dateCreated)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Search by Device IDs
|
||||||
|
if len(deviceIDs) > 0 {
|
||||||
db = db.Where("device_ids && ?", pq.Array(deviceIDs))
|
db = db.Where("device_ids && ?", pq.Array(deviceIDs))
|
||||||
countDb = countDb.Where("device_ids && ?", pq.Array(deviceIDs))
|
countDb = countDb.Where("device_ids && ?", pq.Array(deviceIDs))
|
||||||
}
|
}
|
||||||
|
|
||||||
var total int64
|
// Fetch total count of filtered records
|
||||||
if err := countDb.Model(&models.Contract{}).Count(&total).Error; err != nil {
|
var total int64
|
||||||
log.Printf("GetContracts Error: Database error: %v", err)
|
if err := countDb.Model(&models.Contract{}).Count(&total).Error; err != nil {
|
||||||
return contracts, total, http.StatusInternalServerError, err
|
log.Printf("GetContracts Error: Database error: %v", err)
|
||||||
}
|
return contracts, total, http.StatusInternalServerError, err
|
||||||
|
}
|
||||||
|
|
||||||
if err := db.Order("created_at desc").Limit(limit).Offset(offset).Find(&contracts).Error; err != nil {
|
// Fetch contracts with custom fields
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if err := db.Select(customFields).
|
||||||
log.Printf("GetContracts Error: No contracts found: %v", err)
|
Order("created_at desc").
|
||||||
return contracts, total, http.StatusNotFound, err
|
Limit(limit).
|
||||||
} else {
|
Offset(offset).
|
||||||
log.Printf("GetContracts Error: Database error: %v", err)
|
Find(&contracts).Error; err != nil {
|
||||||
return contracts, total, http.StatusInternalServerError, err
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
}
|
log.Printf("GetContracts Error: No contracts found: %v", err)
|
||||||
}
|
return contracts, total, http.StatusNotFound, err
|
||||||
|
} else {
|
||||||
|
log.Printf("GetContracts Error: Database error: %v", err)
|
||||||
|
return contracts, total, http.StatusInternalServerError, err
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return contracts, total, http.StatusOK, nil
|
return contracts, total, http.StatusOK, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,4 +58,3 @@ func GetInvoices(buyerName string, sortBy string, limit int, offset int, id uint
|
|||||||
|
|
||||||
return invoices, total, nil
|
return invoices, total, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,11 @@ type Company struct {
|
|||||||
Devices []Device
|
Devices []Device
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type CompanyShortResponse struct {
|
||||||
|
ID int
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
func (Company) Update() (bool, error) {
|
func (Company) Update() (bool, error) {
|
||||||
return false, nil
|
return false, nil
|
||||||
|
|||||||
@@ -21,10 +21,44 @@ type Contract struct {
|
|||||||
Status string
|
Status string
|
||||||
BlockchainID string
|
BlockchainID string
|
||||||
ContractInfos []ContractInfo
|
ContractInfos []ContractInfo
|
||||||
|
BuyerName string `gorm:"-"`
|
||||||
|
NumberOfDevices int `gorm:"-"`
|
||||||
}
|
}
|
||||||
|
|
||||||
const ContractStatusActive = "active"
|
const ContractStatusActive = "active"
|
||||||
const ContractStatusPending = "pending"
|
const ContractStatusPending = "pending"
|
||||||
|
const ContractStatusDraft = "draft"
|
||||||
|
const ContractStatusSigned = "signed"
|
||||||
|
const ContractStatusReadyForActivation = "ready_for_activation"
|
||||||
|
const ContractStatusExecuted = "executed"
|
||||||
|
const ContractStatusRevoked = "revoked"
|
||||||
|
|
||||||
|
|
||||||
|
type Status struct {
|
||||||
|
Key string `json:"key"`
|
||||||
|
Value string `json:"value"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func GetContractStatuses() []Status {
|
||||||
|
return []Status{
|
||||||
|
{Key: "Active", Value: "active"},
|
||||||
|
{Key: "Pending signature", Value: "pending"},
|
||||||
|
{Key: "Draft", Value: "draft"},
|
||||||
|
{Key: "Signed", Value: "signed"},
|
||||||
|
{Key: "Ready for Activation", Value: "ready_for_activation"},
|
||||||
|
{Key: "Executed", Value: "executed"},
|
||||||
|
{Key: "Revoked", Value: "revoked"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
type ListContractResponse struct {
|
||||||
|
Status KeyValue `json:"Status"`
|
||||||
|
Buyer CompanyShortResponse `json:"Buyer"`
|
||||||
|
ContractID int
|
||||||
|
NumberOfDevices int
|
||||||
|
DateCreated time.Time
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
func (Contract) Update() (bool, error) {
|
func (Contract) Update() (bool, error) {
|
||||||
return false, nil
|
return false, nil
|
||||||
|
|||||||
@@ -27,9 +27,33 @@ type Invoice struct {
|
|||||||
InvoiceDueDate time.Time
|
InvoiceDueDate time.Time
|
||||||
ContractID uint
|
ContractID uint
|
||||||
InvoiceItem [] InvoiceItem
|
InvoiceItem [] InvoiceItem
|
||||||
|
Status string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
type ListInvoiceResponse struct {
|
||||||
|
Status KeyValue `json:"Status"`
|
||||||
|
Buyer CompanyShortResponse `json:"Buyer"`
|
||||||
|
ContractID int
|
||||||
|
DateCreated time.Time
|
||||||
|
DueDate time.Time
|
||||||
|
Amount string
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
type KeyValue struct {
|
||||||
|
Key string
|
||||||
|
Value string
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func GetInvoiceStatuses() []Status {
|
||||||
|
return []Status{
|
||||||
|
{Key: "Insurance claimed", Value: "insurance_claimed"},
|
||||||
|
{Key: "Invoice issued", Value: "invoice_issued"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (Invoice) Update() (bool, error) {
|
func (Invoice) Update() (bool, error) {
|
||||||
return false, nil
|
return false, nil
|
||||||
|
|||||||
@@ -23,5 +23,9 @@ func RegisterPublicRoutes(r *gin.Engine) {
|
|||||||
r.GET("/text_templates/", controllers.ListTextTemplates)
|
r.GET("/text_templates/", controllers.ListTextTemplates)
|
||||||
r.POST("/text_templates/save", controllers.CreateTextTemplate)
|
r.POST("/text_templates/save", controllers.CreateTextTemplate)
|
||||||
r.GET("/product_templates/:template_id", controllers.GetProductTemplate)
|
r.GET("/product_templates/:template_id", controllers.GetProductTemplate)
|
||||||
|
|
||||||
|
// Contracts
|
||||||
|
r.GET("/contracts/statuses", controllers.GetContractStatuses)
|
||||||
|
r.GET("/contracts/list", controllers.GetBuyerContracts)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user