mirror of
https://github.com/usual2970/certimate.git
synced 2025-07-29 21:54:29 +00:00
feat: migrate pocketbase to v0.23
This commit is contained in:
@@ -3,7 +3,7 @@ package resp
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/labstack/echo/v5"
|
||||
"github.com/pocketbase/pocketbase/core"
|
||||
|
||||
"github.com/usual2970/certimate/internal/domain"
|
||||
)
|
||||
@@ -14,7 +14,7 @@ type Response struct {
|
||||
Data interface{} `json:"data"`
|
||||
}
|
||||
|
||||
func Ok(e echo.Context, data interface{}) error {
|
||||
func Ok(e *core.RequestEvent, data interface{}) error {
|
||||
rs := &Response{
|
||||
Code: 0,
|
||||
Msg: "success",
|
||||
@@ -23,7 +23,7 @@ func Ok(e echo.Context, data interface{}) error {
|
||||
return e.JSON(http.StatusOK, rs)
|
||||
}
|
||||
|
||||
func Err(e echo.Context, err error) error {
|
||||
func Err(e *core.RequestEvent, err error) error {
|
||||
code := 500
|
||||
|
||||
xerr, ok := err.(*domain.Error)
|
||||
|
Reference in New Issue
Block a user