完成教学案例的实现逻辑
This commit is contained in:
@@ -6,13 +6,13 @@ package video_case
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func CreateVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func CreateVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.CreateVideoCaseReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package video_case
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func DeleteVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func DeleteVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.DeleteVideoCaseReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package video_case
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func GetVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func GetVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.GetVideoCaseReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package video_case
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func ListVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func ListVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.ListVideoCaseReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
@@ -6,13 +6,13 @@ package video_case
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/JACKYMYPERSON/hldrCenter/config"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/logic/video_case"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/svc"
|
||||
"github.com/JACKYMYPERSON/hldrCenter/internal/video_case/internal/types"
|
||||
"github.com/zeromicro/go-zero/rest/httpx"
|
||||
)
|
||||
|
||||
func UpdateVideoCaseHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
|
||||
func UpdateVideoCaseHandler(cfg *config.Config) http.HandlerFunc {
|
||||
return func(w http.ResponseWriter, r *http.Request) {
|
||||
var req types.UpdateVideoCaseReq
|
||||
if err := httpx.Parse(r, &req); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user