26 lines
554 B
Go
26 lines
554 B
Go
// Code scaffolded by goctl. Safe to edit.
|
|
// goctl 1.10.1
|
|
|
|
package topic
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"sundynix-micro-go/app/plant/api/internal/logic/topic"
|
|
"sundynix-micro-go/app/plant/api/internal/svc"
|
|
"sundynix-micro-go/common/response"
|
|
)
|
|
|
|
// 话题列表
|
|
func GetTopicListHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
|
return func(w http.ResponseWriter, r *http.Request) {
|
|
l := topic.NewGetTopicListLogic(r.Context(), svcCtx)
|
|
err := l.GetTopicList()
|
|
if err != nil {
|
|
response.Fail(w, err.Error())
|
|
} else {
|
|
response.Ok(w)
|
|
}
|
|
}
|
|
}
|