18 lines
409 B
Go
18 lines
409 B
Go
package ai
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"haixun-backend/internal/logic/ai"
|
|
"haixun-backend/internal/response"
|
|
"haixun-backend/internal/svc"
|
|
)
|
|
|
|
func ListAiProvidersHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
l := ai.NewListAIProvidersLogic(r.Context(), svcCtx)
|
|
data, err := l.ListAIProviders()
|
|
response.Write(r.Context(), w, data, err)
|
|
}
|
|
}
|