21 lines
494 B
Go
21 lines
494 B
Go
package ai
|
|
|
|
import (
|
|
"net/http"
|
|
"sundynix-micro-go/app/plant/api/internal/logic/ai"
|
|
"sundynix-micro-go/app/plant/api/internal/svc"
|
|
"sundynix-micro-go/common/response"
|
|
)
|
|
|
|
func GetAiChatQuotaHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
l := ai.NewGetAiChatQuotaLogic(r.Context(), svcCtx)
|
|
resp, err := l.GetAiChatQuota()
|
|
if err != nil {
|
|
response.Fail(w, err.Error())
|
|
} else {
|
|
response.OkWithData(w, resp)
|
|
}
|
|
}
|
|
}
|