feat: 添加工单请求接口
This commit is contained in:
15
handler/ticket/ticker_gin_handler.go
Normal file
15
handler/ticket/ticker_gin_handler.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package ticket
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
func TicketHandler(c *gin.Context) {
|
||||
tickets, err := getAllTicket()
|
||||
if err != nil {
|
||||
c.AbortWithError(http.StatusInternalServerError, err)
|
||||
}
|
||||
c.JSON(200, tickets)
|
||||
}
|
||||
Reference in New Issue
Block a user