intial commit
This commit is contained in:
37
controllers/platform.go
Normal file
37
controllers/platform.go
Normal file
@@ -0,0 +1,37 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"nearle/domain"
|
||||
"net/http"
|
||||
"strconv"
|
||||
|
||||
"github.com/gofiber/fiber/v2"
|
||||
)
|
||||
|
||||
func GetModules(c *fiber.Ctx) error {
|
||||
|
||||
mid, _ := strconv.Atoi(c.Query("moduleid"))
|
||||
|
||||
result := domain.GetModules(mid)
|
||||
|
||||
return c.JSON(fiber.Map{
|
||||
"code": http.StatusCreated,
|
||||
"message": "Success",
|
||||
"status": true,
|
||||
"details": result,
|
||||
})
|
||||
}
|
||||
|
||||
func GetSmsProvider(c *fiber.Ctx) error {
|
||||
|
||||
tid, _ := strconv.Atoi(c.Query("templatetypeid"))
|
||||
|
||||
result := domain.GetSmsprovider(tid)
|
||||
|
||||
return c.JSON(fiber.Map{
|
||||
"code": http.StatusOK,
|
||||
"message": "Success",
|
||||
"status": true,
|
||||
"details": result,
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user