routes.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700
  1. // Code generated by goctl. DO NOT EDIT.
  2. package handler
  3. import (
  4. "net/http"
  5. ChatRoomMember "wechat-api/internal/handler/ChatRoomMember"
  6. Message "wechat-api/internal/handler/Message"
  7. User "wechat-api/internal/handler/User"
  8. WechatServer "wechat-api/internal/handler/WechatServer"
  9. Wx "wechat-api/internal/handler/Wx"
  10. Wxhook "wechat-api/internal/handler/Wxhook"
  11. agent "wechat-api/internal/handler/agent"
  12. base "wechat-api/internal/handler/base"
  13. batch_msg "wechat-api/internal/handler/batch_msg"
  14. contact "wechat-api/internal/handler/contact"
  15. employee "wechat-api/internal/handler/employee"
  16. label "wechat-api/internal/handler/label"
  17. label_relationship "wechat-api/internal/handler/label_relationship"
  18. message_records "wechat-api/internal/handler/message_records"
  19. openapi "wechat-api/internal/handler/openapi"
  20. sop_node "wechat-api/internal/handler/sop_node"
  21. sop_stage "wechat-api/internal/handler/sop_stage"
  22. sop_task "wechat-api/internal/handler/sop_task"
  23. tutorial "wechat-api/internal/handler/tutorial"
  24. work_experience "wechat-api/internal/handler/work_experience"
  25. "wechat-api/internal/svc"
  26. "github.com/zeromicro/go-zero/rest"
  27. )
  28. func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
  29. server.AddRoutes(
  30. []rest.Route{
  31. {
  32. Method: http.MethodGet,
  33. Path: "/init/database",
  34. Handler: base.InitDatabaseHandler(serverCtx),
  35. },
  36. },
  37. )
  38. server.AddRoutes(
  39. rest.WithMiddlewares(
  40. []rest.Middleware{serverCtx.Authority},
  41. []rest.Route{
  42. {
  43. Method: http.MethodPost,
  44. Path: "/server/create",
  45. Handler: WechatServer.CreateServerHandler(serverCtx),
  46. },
  47. {
  48. Method: http.MethodPost,
  49. Path: "/server/update",
  50. Handler: WechatServer.UpdateServerHandler(serverCtx),
  51. },
  52. {
  53. Method: http.MethodPost,
  54. Path: "/server/delete",
  55. Handler: WechatServer.DeleteServerHandler(serverCtx),
  56. },
  57. {
  58. Method: http.MethodPost,
  59. Path: "/server/list",
  60. Handler: WechatServer.GetServerListHandler(serverCtx),
  61. },
  62. {
  63. Method: http.MethodPost,
  64. Path: "/server",
  65. Handler: WechatServer.GetServerByIdHandler(serverCtx),
  66. },
  67. }...,
  68. ),
  69. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  70. )
  71. server.AddRoutes(
  72. rest.WithMiddlewares(
  73. []rest.Middleware{serverCtx.Authority},
  74. []rest.Route{
  75. {
  76. Method: http.MethodPost,
  77. Path: "/wx/create",
  78. Handler: Wx.CreateWxHandler(serverCtx),
  79. },
  80. {
  81. Method: http.MethodPost,
  82. Path: "/wx/update",
  83. Handler: Wx.UpdateWxHandler(serverCtx),
  84. },
  85. {
  86. Method: http.MethodPost,
  87. Path: "/wx/delete",
  88. Handler: Wx.DeleteWxHandler(serverCtx),
  89. },
  90. {
  91. Method: http.MethodPost,
  92. Path: "/wx/list",
  93. Handler: Wx.GetWxListHandler(serverCtx),
  94. },
  95. {
  96. Method: http.MethodPost,
  97. Path: "/wx",
  98. Handler: Wx.GetWxByIdHandler(serverCtx),
  99. },
  100. }...,
  101. ),
  102. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  103. )
  104. server.AddRoutes(
  105. rest.WithMiddlewares(
  106. []rest.Middleware{serverCtx.Authority},
  107. []rest.Route{
  108. {
  109. Method: http.MethodPost,
  110. Path: "/agent/create",
  111. Handler: agent.CreateAgentHandler(serverCtx),
  112. },
  113. {
  114. Method: http.MethodPost,
  115. Path: "/agent/update",
  116. Handler: agent.UpdateAgentHandler(serverCtx),
  117. },
  118. {
  119. Method: http.MethodPost,
  120. Path: "/agent/delete",
  121. Handler: agent.DeleteAgentHandler(serverCtx),
  122. },
  123. {
  124. Method: http.MethodPost,
  125. Path: "/agent/list",
  126. Handler: agent.GetAgentListHandler(serverCtx),
  127. },
  128. {
  129. Method: http.MethodPost,
  130. Path: "/agent",
  131. Handler: agent.GetAgentByIdHandler(serverCtx),
  132. },
  133. }...,
  134. ),
  135. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  136. )
  137. server.AddRoutes(
  138. []rest.Route{
  139. {
  140. Method: http.MethodPost,
  141. Path: "/wxhook/sendTextMsg",
  142. Handler: Wxhook.SendTextMsgHandler(serverCtx),
  143. },
  144. },
  145. )
  146. server.AddRoutes(
  147. rest.WithMiddlewares(
  148. []rest.Middleware{serverCtx.Authority},
  149. []rest.Route{
  150. {
  151. Method: http.MethodPost,
  152. Path: "/wxhook/refreshLoginQR",
  153. Handler: Wxhook.RefreshLoginQRHandler(serverCtx),
  154. },
  155. {
  156. Method: http.MethodPost,
  157. Path: "/wxhook/logout",
  158. Handler: Wxhook.LogoutHandler(serverCtx),
  159. },
  160. {
  161. Method: http.MethodPost,
  162. Path: "/wxhook/getFriendsAndGroups",
  163. Handler: Wxhook.GetFriendsAndGroupsHandler(serverCtx),
  164. },
  165. {
  166. Method: http.MethodPost,
  167. Path: "/wxhook/sendPicMsg",
  168. Handler: Wxhook.SendPicMsgHandler(serverCtx),
  169. },
  170. {
  171. Method: http.MethodPost,
  172. Path: "/wxhook/sendPicMsgLocal",
  173. Handler: Wxhook.SendPicMsgLocalHandler(serverCtx),
  174. },
  175. }...,
  176. ),
  177. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  178. )
  179. server.AddRoutes(
  180. rest.WithMiddlewares(
  181. []rest.Middleware{serverCtx.Authority},
  182. []rest.Route{
  183. {
  184. Method: http.MethodPost,
  185. Path: "/contact/create",
  186. Handler: contact.CreateContactHandler(serverCtx),
  187. },
  188. {
  189. Method: http.MethodPost,
  190. Path: "/contact/update",
  191. Handler: contact.UpdateContactHandler(serverCtx),
  192. },
  193. {
  194. Method: http.MethodPost,
  195. Path: "/contact/delete",
  196. Handler: contact.DeleteContactHandler(serverCtx),
  197. },
  198. {
  199. Method: http.MethodPost,
  200. Path: "/contact/list",
  201. Handler: contact.GetContactListHandler(serverCtx),
  202. },
  203. {
  204. Method: http.MethodPost,
  205. Path: "/contact",
  206. Handler: contact.GetContactByIdHandler(serverCtx),
  207. },
  208. {
  209. Method: http.MethodPost,
  210. Path: "/contact/addNewFriend",
  211. Handler: contact.AddNewFriendHandler(serverCtx),
  212. },
  213. }...,
  214. ),
  215. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  216. )
  217. server.AddRoutes(
  218. rest.WithMiddlewares(
  219. []rest.Middleware{serverCtx.Authority},
  220. []rest.Route{
  221. {
  222. Method: http.MethodPost,
  223. Path: "/label_relationship/create",
  224. Handler: label_relationship.CreateLabelRelationshipHandler(serverCtx),
  225. },
  226. {
  227. Method: http.MethodPost,
  228. Path: "/label_relationship/update",
  229. Handler: label_relationship.UpdateLabelRelationshipHandler(serverCtx),
  230. },
  231. {
  232. Method: http.MethodPost,
  233. Path: "/label_relationship/update_contact_labels",
  234. Handler: label_relationship.UpdateLabelRelationshipsHandler(serverCtx),
  235. },
  236. {
  237. Method: http.MethodPost,
  238. Path: "/label_relationship/batch_update_contact_labels",
  239. Handler: label_relationship.BatchUpdateLabelRelationshipsHandler(serverCtx),
  240. },
  241. {
  242. Method: http.MethodPost,
  243. Path: "/label_relationship/delete",
  244. Handler: label_relationship.DeleteLabelRelationshipHandler(serverCtx),
  245. },
  246. {
  247. Method: http.MethodPost,
  248. Path: "/label_relationship/list",
  249. Handler: label_relationship.GetLabelRelationshipListHandler(serverCtx),
  250. },
  251. {
  252. Method: http.MethodPost,
  253. Path: "/label_relationship",
  254. Handler: label_relationship.GetLabelRelationshipByIdHandler(serverCtx),
  255. },
  256. }...,
  257. ),
  258. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  259. )
  260. server.AddRoutes(
  261. rest.WithMiddlewares(
  262. []rest.Middleware{serverCtx.Authority},
  263. []rest.Route{
  264. {
  265. Method: http.MethodPost,
  266. Path: "/message/create",
  267. Handler: Message.CreateMessageHandler(serverCtx),
  268. },
  269. {
  270. Method: http.MethodPost,
  271. Path: "/message/update",
  272. Handler: Message.UpdateMessageHandler(serverCtx),
  273. },
  274. {
  275. Method: http.MethodPost,
  276. Path: "/message/delete",
  277. Handler: Message.DeleteMessageHandler(serverCtx),
  278. },
  279. {
  280. Method: http.MethodPost,
  281. Path: "/message/list",
  282. Handler: Message.GetMessageListHandler(serverCtx),
  283. },
  284. {
  285. Method: http.MethodPost,
  286. Path: "/message",
  287. Handler: Message.GetMessageByIdHandler(serverCtx),
  288. },
  289. }...,
  290. ),
  291. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  292. )
  293. server.AddRoutes(
  294. rest.WithMiddlewares(
  295. []rest.Middleware{serverCtx.Authority},
  296. []rest.Route{
  297. {
  298. Method: http.MethodPost,
  299. Path: "/label/create",
  300. Handler: label.CreateLabelHandler(serverCtx),
  301. },
  302. {
  303. Method: http.MethodPost,
  304. Path: "/label/update",
  305. Handler: label.UpdateLabelHandler(serverCtx),
  306. },
  307. {
  308. Method: http.MethodPost,
  309. Path: "/label/delete",
  310. Handler: label.DeleteLabelHandler(serverCtx),
  311. },
  312. {
  313. Method: http.MethodPost,
  314. Path: "/label/list",
  315. Handler: label.GetLabelListHandler(serverCtx),
  316. },
  317. {
  318. Method: http.MethodPost,
  319. Path: "/label/select_list",
  320. Handler: label.GetLabelSelectListHandler(serverCtx),
  321. },
  322. {
  323. Method: http.MethodPost,
  324. Path: "/label/contacts",
  325. Handler: label.GetLabelContactsHandler(serverCtx),
  326. },
  327. {
  328. Method: http.MethodPost,
  329. Path: "/label",
  330. Handler: label.GetLabelByIdHandler(serverCtx),
  331. },
  332. }...,
  333. ),
  334. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  335. )
  336. server.AddRoutes(
  337. rest.WithMiddlewares(
  338. []rest.Middleware{serverCtx.Authority},
  339. []rest.Route{
  340. {
  341. Method: http.MethodPost,
  342. Path: "/sop_task/create",
  343. Handler: sop_task.CreateSopTaskHandler(serverCtx),
  344. },
  345. {
  346. Method: http.MethodPost,
  347. Path: "/sop_task/update",
  348. Handler: sop_task.UpdateSopTaskHandler(serverCtx),
  349. },
  350. {
  351. Method: http.MethodPost,
  352. Path: "/sop_task/delete",
  353. Handler: sop_task.DeleteSopTaskHandler(serverCtx),
  354. },
  355. {
  356. Method: http.MethodPost,
  357. Path: "/sop_task/list",
  358. Handler: sop_task.GetSopTaskListHandler(serverCtx),
  359. },
  360. {
  361. Method: http.MethodPost,
  362. Path: "/sop_task/record_list",
  363. Handler: sop_task.GetSopTaskRecordListHandler(serverCtx),
  364. },
  365. {
  366. Method: http.MethodPost,
  367. Path: "/sop_task",
  368. Handler: sop_task.GetSopTaskByIdHandler(serverCtx),
  369. },
  370. {
  371. Method: http.MethodPost,
  372. Path: "/sop_task/detail",
  373. Handler: sop_task.GetSopTaskDetailHandler(serverCtx),
  374. },
  375. {
  376. Method: http.MethodPost,
  377. Path: "/sop_task/publish",
  378. Handler: sop_task.PublishSopTaskHandler(serverCtx),
  379. },
  380. {
  381. Method: http.MethodPost,
  382. Path: "/sop_task/start",
  383. Handler: sop_task.SopTaskStartHandler(serverCtx),
  384. },
  385. {
  386. Method: http.MethodPost,
  387. Path: "/sop_task/stop",
  388. Handler: sop_task.SopTaskStopHandler(serverCtx),
  389. },
  390. }...,
  391. ),
  392. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  393. )
  394. server.AddRoutes(
  395. rest.WithMiddlewares(
  396. []rest.Middleware{serverCtx.Authority},
  397. []rest.Route{
  398. {
  399. Method: http.MethodPost,
  400. Path: "/sop_stage/create",
  401. Handler: sop_stage.CreateSopStageHandler(serverCtx),
  402. },
  403. {
  404. Method: http.MethodPost,
  405. Path: "/sop_stage/update",
  406. Handler: sop_stage.UpdateSopStageHandler(serverCtx),
  407. },
  408. {
  409. Method: http.MethodPost,
  410. Path: "/sop_stage/delete",
  411. Handler: sop_stage.DeleteSopStageHandler(serverCtx),
  412. },
  413. {
  414. Method: http.MethodPost,
  415. Path: "/sop_stage/list",
  416. Handler: sop_stage.GetSopStageListHandler(serverCtx),
  417. },
  418. {
  419. Method: http.MethodPost,
  420. Path: "/sop_stage",
  421. Handler: sop_stage.GetSopStageByIdHandler(serverCtx),
  422. },
  423. {
  424. Method: http.MethodPost,
  425. Path: "/sop_stage/detail",
  426. Handler: sop_stage.GetSopStageDetailHandler(serverCtx),
  427. },
  428. {
  429. Method: http.MethodPost,
  430. Path: "/sop_stage/move",
  431. Handler: sop_stage.MoveSopStageHandler(serverCtx),
  432. },
  433. }...,
  434. ),
  435. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  436. )
  437. server.AddRoutes(
  438. rest.WithMiddlewares(
  439. []rest.Middleware{serverCtx.Authority},
  440. []rest.Route{
  441. {
  442. Method: http.MethodPost,
  443. Path: "/sop_node/create",
  444. Handler: sop_node.CreateSopNodeHandler(serverCtx),
  445. },
  446. {
  447. Method: http.MethodPost,
  448. Path: "/sop_node/update",
  449. Handler: sop_node.UpdateSopNodeHandler(serverCtx),
  450. },
  451. {
  452. Method: http.MethodPost,
  453. Path: "/sop_node/delete",
  454. Handler: sop_node.DeleteSopNodeHandler(serverCtx),
  455. },
  456. {
  457. Method: http.MethodPost,
  458. Path: "/sop_node/list",
  459. Handler: sop_node.GetSopNodeListHandler(serverCtx),
  460. },
  461. {
  462. Method: http.MethodPost,
  463. Path: "/sop_node/detail",
  464. Handler: sop_node.GetSopNodeDetailHandler(serverCtx),
  465. },
  466. }...,
  467. ),
  468. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  469. )
  470. server.AddRoutes(
  471. rest.WithMiddlewares(
  472. []rest.Middleware{serverCtx.Authority},
  473. []rest.Route{
  474. {
  475. Method: http.MethodPost,
  476. Path: "/message_records/create",
  477. Handler: message_records.CreateMessageRecordsHandler(serverCtx),
  478. },
  479. {
  480. Method: http.MethodPost,
  481. Path: "/message_records/update",
  482. Handler: message_records.UpdateMessageRecordsHandler(serverCtx),
  483. },
  484. {
  485. Method: http.MethodPost,
  486. Path: "/message_records/delete",
  487. Handler: message_records.DeleteMessageRecordsHandler(serverCtx),
  488. },
  489. {
  490. Method: http.MethodPost,
  491. Path: "/message_records/list",
  492. Handler: message_records.GetMessageRecordsListHandler(serverCtx),
  493. },
  494. {
  495. Method: http.MethodPost,
  496. Path: "/message_records",
  497. Handler: message_records.GetMessageRecordsByIdHandler(serverCtx),
  498. },
  499. }...,
  500. ),
  501. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  502. )
  503. server.AddRoutes(
  504. rest.WithMiddlewares(
  505. []rest.Middleware{serverCtx.Authority},
  506. []rest.Route{
  507. {
  508. Method: http.MethodPost,
  509. Path: "/chatroom_member/list",
  510. Handler: ChatRoomMember.GetChatroomMemberListHandler(serverCtx),
  511. },
  512. }...,
  513. ),
  514. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  515. )
  516. server.AddRoutes(
  517. rest.WithMiddlewares(
  518. []rest.Middleware{serverCtx.Authority},
  519. []rest.Route{
  520. {
  521. Method: http.MethodGet,
  522. Path: "/user/info",
  523. Handler: User.GetUserInfoHandler(serverCtx),
  524. },
  525. }...,
  526. ),
  527. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  528. )
  529. server.AddRoutes(
  530. []rest.Route{
  531. {
  532. Method: http.MethodPost,
  533. Path: "/contact/getContactByWxid",
  534. Handler: openapi.OpenapiGetContactByWxidHandler(serverCtx),
  535. },
  536. {
  537. Method: http.MethodPost,
  538. Path: "/contact/getContactList",
  539. Handler: openapi.OpenapiGetContactListHandler(serverCtx),
  540. },
  541. },
  542. rest.WithPrefix("/openapi"),
  543. )
  544. server.AddRoutes(
  545. rest.WithMiddlewares(
  546. []rest.Middleware{serverCtx.Authority},
  547. []rest.Route{
  548. {
  549. Method: http.MethodPost,
  550. Path: "/batch_msg/create",
  551. Handler: batch_msg.CreateBatchMsgHandler(serverCtx),
  552. },
  553. {
  554. Method: http.MethodPost,
  555. Path: "/batch_msg/update",
  556. Handler: batch_msg.UpdateBatchMsgHandler(serverCtx),
  557. },
  558. {
  559. Method: http.MethodPost,
  560. Path: "/batch_msg/delete",
  561. Handler: batch_msg.DeleteBatchMsgHandler(serverCtx),
  562. },
  563. {
  564. Method: http.MethodPost,
  565. Path: "/batch_msg/list",
  566. Handler: batch_msg.GetBatchMsgListHandler(serverCtx),
  567. },
  568. {
  569. Method: http.MethodPost,
  570. Path: "/batch_msg",
  571. Handler: batch_msg.GetBatchMsgByIdHandler(serverCtx),
  572. },
  573. }...,
  574. ),
  575. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  576. )
  577. server.AddRoutes(
  578. rest.WithMiddlewares(
  579. []rest.Middleware{serverCtx.Authority},
  580. []rest.Route{
  581. {
  582. Method: http.MethodPost,
  583. Path: "/employee/create",
  584. Handler: employee.CreateEmployeeHandler(serverCtx),
  585. },
  586. {
  587. Method: http.MethodPost,
  588. Path: "/employee/update",
  589. Handler: employee.UpdateEmployeeHandler(serverCtx),
  590. },
  591. {
  592. Method: http.MethodPost,
  593. Path: "/employee/delete",
  594. Handler: employee.DeleteEmployeeHandler(serverCtx),
  595. },
  596. {
  597. Method: http.MethodPost,
  598. Path: "/employee/list",
  599. Handler: employee.GetEmployeeListHandler(serverCtx),
  600. },
  601. {
  602. Method: http.MethodPost,
  603. Path: "/employee",
  604. Handler: employee.GetEmployeeByIdHandler(serverCtx),
  605. },
  606. }...,
  607. ),
  608. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  609. )
  610. server.AddRoutes(
  611. rest.WithMiddlewares(
  612. []rest.Middleware{serverCtx.Authority},
  613. []rest.Route{
  614. {
  615. Method: http.MethodPost,
  616. Path: "/work_experience/create",
  617. Handler: work_experience.CreateWorkExperienceHandler(serverCtx),
  618. },
  619. {
  620. Method: http.MethodPost,
  621. Path: "/work_experience/update",
  622. Handler: work_experience.UpdateWorkExperienceHandler(serverCtx),
  623. },
  624. {
  625. Method: http.MethodPost,
  626. Path: "/work_experience/delete",
  627. Handler: work_experience.DeleteWorkExperienceHandler(serverCtx),
  628. },
  629. {
  630. Method: http.MethodPost,
  631. Path: "/work_experience/list",
  632. Handler: work_experience.GetWorkExperienceListHandler(serverCtx),
  633. },
  634. {
  635. Method: http.MethodPost,
  636. Path: "/work_experience",
  637. Handler: work_experience.GetWorkExperienceByIdHandler(serverCtx),
  638. },
  639. }...,
  640. ),
  641. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  642. )
  643. server.AddRoutes(
  644. rest.WithMiddlewares(
  645. []rest.Middleware{serverCtx.Authority},
  646. []rest.Route{
  647. {
  648. Method: http.MethodPost,
  649. Path: "/tutorial/create",
  650. Handler: tutorial.CreateTutorialHandler(serverCtx),
  651. },
  652. {
  653. Method: http.MethodPost,
  654. Path: "/tutorial/update",
  655. Handler: tutorial.UpdateTutorialHandler(serverCtx),
  656. },
  657. {
  658. Method: http.MethodPost,
  659. Path: "/tutorial/delete",
  660. Handler: tutorial.DeleteTutorialHandler(serverCtx),
  661. },
  662. {
  663. Method: http.MethodPost,
  664. Path: "/tutorial/list",
  665. Handler: tutorial.GetTutorialListHandler(serverCtx),
  666. },
  667. {
  668. Method: http.MethodPost,
  669. Path: "/tutorial",
  670. Handler: tutorial.GetTutorialByIdHandler(serverCtx),
  671. },
  672. }...,
  673. ),
  674. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  675. )
  676. }