routes.go 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350
  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. Msg "wechat-api/internal/handler/Msg"
  8. User "wechat-api/internal/handler/User"
  9. WechatServer "wechat-api/internal/handler/WechatServer"
  10. Wx "wechat-api/internal/handler/Wx"
  11. Wxhook "wechat-api/internal/handler/Wxhook"
  12. agent "wechat-api/internal/handler/agent"
  13. agent_base "wechat-api/internal/handler/agent_base"
  14. aliyun_avatar "wechat-api/internal/handler/aliyun_avatar"
  15. avatar "wechat-api/internal/handler/avatar"
  16. base "wechat-api/internal/handler/base"
  17. batch_msg "wechat-api/internal/handler/batch_msg"
  18. category "wechat-api/internal/handler/category"
  19. chatrecords "wechat-api/internal/handler/chatrecords"
  20. chatsession "wechat-api/internal/handler/chatsession"
  21. contact "wechat-api/internal/handler/contact"
  22. employee "wechat-api/internal/handler/employee"
  23. employee_config "wechat-api/internal/handler/employee_config"
  24. label "wechat-api/internal/handler/label"
  25. label_relationship "wechat-api/internal/handler/label_relationship"
  26. message_records "wechat-api/internal/handler/message_records"
  27. openapi "wechat-api/internal/handler/openapi"
  28. sop_node "wechat-api/internal/handler/sop_node"
  29. sop_stage "wechat-api/internal/handler/sop_stage"
  30. sop_task "wechat-api/internal/handler/sop_task"
  31. token "wechat-api/internal/handler/token"
  32. tutorial "wechat-api/internal/handler/tutorial"
  33. work_experience "wechat-api/internal/handler/work_experience"
  34. wxcard "wechat-api/internal/handler/wxcard"
  35. wxcarduser "wechat-api/internal/handler/wxcarduser"
  36. wxcardvisit "wechat-api/internal/handler/wxcardvisit"
  37. "wechat-api/internal/svc"
  38. "github.com/zeromicro/go-zero/rest"
  39. )
  40. func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
  41. server.AddRoutes(
  42. []rest.Route{
  43. {
  44. Method: http.MethodGet,
  45. Path: "/init/database",
  46. Handler: base.InitDatabaseHandler(serverCtx),
  47. },
  48. },
  49. )
  50. server.AddRoutes(
  51. rest.WithMiddlewares(
  52. []rest.Middleware{serverCtx.Authority},
  53. []rest.Route{
  54. {
  55. Method: http.MethodPost,
  56. Path: "/server/create",
  57. Handler: WechatServer.CreateServerHandler(serverCtx),
  58. },
  59. {
  60. Method: http.MethodPost,
  61. Path: "/server/update",
  62. Handler: WechatServer.UpdateServerHandler(serverCtx),
  63. },
  64. {
  65. Method: http.MethodPost,
  66. Path: "/server/delete",
  67. Handler: WechatServer.DeleteServerHandler(serverCtx),
  68. },
  69. {
  70. Method: http.MethodPost,
  71. Path: "/server/list",
  72. Handler: WechatServer.GetServerListHandler(serverCtx),
  73. },
  74. {
  75. Method: http.MethodPost,
  76. Path: "/server",
  77. Handler: WechatServer.GetServerByIdHandler(serverCtx),
  78. },
  79. }...,
  80. ),
  81. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  82. )
  83. server.AddRoutes(
  84. rest.WithMiddlewares(
  85. []rest.Middleware{serverCtx.Authority},
  86. []rest.Route{
  87. {
  88. Method: http.MethodPost,
  89. Path: "/wx/create",
  90. Handler: Wx.CreateWxHandler(serverCtx),
  91. },
  92. {
  93. Method: http.MethodPost,
  94. Path: "/wx/check",
  95. Handler: Wx.CheckWxHandler(serverCtx),
  96. },
  97. {
  98. Method: http.MethodPost,
  99. Path: "/wx/update",
  100. Handler: Wx.UpdateWxHandler(serverCtx),
  101. },
  102. {
  103. Method: http.MethodPost,
  104. Path: "/wx/updateBlockAndAllowList",
  105. Handler: Wx.UpdateBlockAndAllowListHandler(serverCtx),
  106. },
  107. {
  108. Method: http.MethodPost,
  109. Path: "/wx/delete",
  110. Handler: Wx.DeleteWxHandler(serverCtx),
  111. },
  112. {
  113. Method: http.MethodPost,
  114. Path: "/wx/list",
  115. Handler: Wx.GetWxListHandler(serverCtx),
  116. },
  117. {
  118. Method: http.MethodPost,
  119. Path: "/wx/getWxAllowBlockList",
  120. Handler: Wx.GetWxAllowBlockListHandler(serverCtx),
  121. },
  122. {
  123. Method: http.MethodPost,
  124. Path: "/wx",
  125. Handler: Wx.GetWxByIdHandler(serverCtx),
  126. },
  127. }...,
  128. ),
  129. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  130. )
  131. server.AddRoutes(
  132. rest.WithMiddlewares(
  133. []rest.Middleware{serverCtx.Authority},
  134. []rest.Route{
  135. {
  136. Method: http.MethodPost,
  137. Path: "/agent/create",
  138. Handler: agent.CreateAgentHandler(serverCtx),
  139. },
  140. {
  141. Method: http.MethodPost,
  142. Path: "/agent/update",
  143. Handler: agent.UpdateAgentHandler(serverCtx),
  144. },
  145. {
  146. Method: http.MethodPost,
  147. Path: "/agent/delete",
  148. Handler: agent.DeleteAgentHandler(serverCtx),
  149. },
  150. {
  151. Method: http.MethodPost,
  152. Path: "/agent/list",
  153. Handler: agent.GetAgentListHandler(serverCtx),
  154. },
  155. {
  156. Method: http.MethodPost,
  157. Path: "/agent",
  158. Handler: agent.GetAgentByIdHandler(serverCtx),
  159. },
  160. {
  161. Method: http.MethodPost,
  162. Path: "/agent/collection/list",
  163. Handler: agent.GetAgentCollectionListHandler(serverCtx),
  164. },
  165. {
  166. Method: http.MethodPost,
  167. Path: "/agent/collection/detail",
  168. Handler: agent.GetAgentCollectionInfoHandler(serverCtx),
  169. },
  170. {
  171. Method: http.MethodPost,
  172. Path: "/agent/data/list",
  173. Handler: agent.GetAgentDataListHandler(serverCtx),
  174. },
  175. {
  176. Method: http.MethodPost,
  177. Path: "/agent/data/detail",
  178. Handler: agent.GetAgentDataDetailHandler(serverCtx),
  179. },
  180. {
  181. Method: http.MethodPost,
  182. Path: "/agent/data/create",
  183. Handler: agent.CreateAgentDataHandler(serverCtx),
  184. },
  185. {
  186. Method: http.MethodPost,
  187. Path: "/agent/data/update",
  188. Handler: agent.UpdateAgentDataHandler(serverCtx),
  189. },
  190. {
  191. Method: http.MethodPost,
  192. Path: "/agent/data/delete",
  193. Handler: agent.DeleteAgentDataHandler(serverCtx),
  194. },
  195. }...,
  196. ),
  197. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  198. )
  199. server.AddRoutes(
  200. rest.WithMiddlewares(
  201. []rest.Middleware{serverCtx.Authority},
  202. []rest.Route{
  203. {
  204. Method: http.MethodPost,
  205. Path: "/label_relationship/create",
  206. Handler: label_relationship.CreateLabelRelationshipHandler(serverCtx),
  207. },
  208. {
  209. Method: http.MethodPost,
  210. Path: "/label_relationship/update",
  211. Handler: label_relationship.UpdateLabelRelationshipHandler(serverCtx),
  212. },
  213. {
  214. Method: http.MethodPost,
  215. Path: "/label_relationship/update_contact_labels",
  216. Handler: label_relationship.UpdateLabelRelationshipsHandler(serverCtx),
  217. },
  218. {
  219. Method: http.MethodPost,
  220. Path: "/label_relationship/batch_update_contact_labels",
  221. Handler: label_relationship.BatchUpdateLabelRelationshipsHandler(serverCtx),
  222. },
  223. {
  224. Method: http.MethodPost,
  225. Path: "/label_relationship/delete",
  226. Handler: label_relationship.DeleteLabelRelationshipHandler(serverCtx),
  227. },
  228. {
  229. Method: http.MethodPost,
  230. Path: "/label_relationship/list",
  231. Handler: label_relationship.GetLabelRelationshipListHandler(serverCtx),
  232. },
  233. {
  234. Method: http.MethodPost,
  235. Path: "/label_relationship",
  236. Handler: label_relationship.GetLabelRelationshipByIdHandler(serverCtx),
  237. },
  238. }...,
  239. ),
  240. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  241. )
  242. server.AddRoutes(
  243. []rest.Route{
  244. {
  245. Method: http.MethodPost,
  246. Path: "/wxhook/sendTextMsg",
  247. Handler: Wxhook.SendTextMsgHandler(serverCtx),
  248. },
  249. },
  250. )
  251. server.AddRoutes(
  252. rest.WithMiddlewares(
  253. []rest.Middleware{serverCtx.Authority},
  254. []rest.Route{
  255. {
  256. Method: http.MethodPost,
  257. Path: "/wxhook/refreshLoginQR",
  258. Handler: Wxhook.RefreshLoginQRHandler(serverCtx),
  259. },
  260. {
  261. Method: http.MethodPost,
  262. Path: "/wxhook/logout",
  263. Handler: Wxhook.LogoutHandler(serverCtx),
  264. },
  265. {
  266. Method: http.MethodPost,
  267. Path: "/wxhook/terminateThisWeChat",
  268. Handler: Wxhook.TerminateThisWeChatHandler(serverCtx),
  269. },
  270. {
  271. Method: http.MethodPost,
  272. Path: "/wxhook/getFriendsAndGroups",
  273. Handler: Wxhook.GetFriendsAndGroupsHandler(serverCtx),
  274. },
  275. {
  276. Method: http.MethodPost,
  277. Path: "/wxhook/sendPicMsg",
  278. Handler: Wxhook.SendPicMsgHandler(serverCtx),
  279. },
  280. {
  281. Method: http.MethodPost,
  282. Path: "/wxhook/sendPicMsgLocal",
  283. Handler: Wxhook.SendPicMsgLocalHandler(serverCtx),
  284. },
  285. }...,
  286. ),
  287. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  288. )
  289. server.AddRoutes(
  290. rest.WithMiddlewares(
  291. []rest.Middleware{serverCtx.Authority},
  292. []rest.Route{
  293. {
  294. Method: http.MethodPost,
  295. Path: "/contact/create",
  296. Handler: contact.CreateContactHandler(serverCtx),
  297. },
  298. {
  299. Method: http.MethodPost,
  300. Path: "/contact/update",
  301. Handler: contact.UpdateContactHandler(serverCtx),
  302. },
  303. {
  304. Method: http.MethodPost,
  305. Path: "/contact/delete",
  306. Handler: contact.DeleteContactHandler(serverCtx),
  307. },
  308. {
  309. Method: http.MethodPost,
  310. Path: "/contact/list",
  311. Handler: contact.GetContactListHandler(serverCtx),
  312. },
  313. {
  314. Method: http.MethodPost,
  315. Path: "/contact",
  316. Handler: contact.GetContactByIdHandler(serverCtx),
  317. },
  318. {
  319. Method: http.MethodPost,
  320. Path: "/contact/addNewFriend",
  321. Handler: contact.AddNewFriendHandler(serverCtx),
  322. },
  323. }...,
  324. ),
  325. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  326. )
  327. server.AddRoutes(
  328. rest.WithMiddlewares(
  329. []rest.Middleware{serverCtx.Authority},
  330. []rest.Route{
  331. {
  332. Method: http.MethodPost,
  333. Path: "/message/create",
  334. Handler: Message.CreateMessageHandler(serverCtx),
  335. },
  336. {
  337. Method: http.MethodPost,
  338. Path: "/message/update",
  339. Handler: Message.UpdateMessageHandler(serverCtx),
  340. },
  341. {
  342. Method: http.MethodPost,
  343. Path: "/message/delete",
  344. Handler: Message.DeleteMessageHandler(serverCtx),
  345. },
  346. {
  347. Method: http.MethodPost,
  348. Path: "/message/list",
  349. Handler: Message.GetMessageListHandler(serverCtx),
  350. },
  351. {
  352. Method: http.MethodPost,
  353. Path: "/message",
  354. Handler: Message.GetMessageByIdHandler(serverCtx),
  355. },
  356. }...,
  357. ),
  358. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  359. )
  360. server.AddRoutes(
  361. rest.WithMiddlewares(
  362. []rest.Middleware{serverCtx.Authority},
  363. []rest.Route{
  364. {
  365. Method: http.MethodPost,
  366. Path: "/label/create",
  367. Handler: label.CreateLabelHandler(serverCtx),
  368. },
  369. {
  370. Method: http.MethodPost,
  371. Path: "/label/update",
  372. Handler: label.UpdateLabelHandler(serverCtx),
  373. },
  374. {
  375. Method: http.MethodPost,
  376. Path: "/label/delete",
  377. Handler: label.DeleteLabelHandler(serverCtx),
  378. },
  379. {
  380. Method: http.MethodPost,
  381. Path: "/label/list",
  382. Handler: label.GetLabelListHandler(serverCtx),
  383. },
  384. {
  385. Method: http.MethodPost,
  386. Path: "/label/select_list",
  387. Handler: label.GetLabelSelectListHandler(serverCtx),
  388. },
  389. {
  390. Method: http.MethodPost,
  391. Path: "/label/batch_select_list",
  392. Handler: label.GetLabelBatchSelectListHandler(serverCtx),
  393. },
  394. {
  395. Method: http.MethodPost,
  396. Path: "/label/contacts",
  397. Handler: label.GetLabelContactsHandler(serverCtx),
  398. },
  399. {
  400. Method: http.MethodPost,
  401. Path: "/label",
  402. Handler: label.GetLabelByIdHandler(serverCtx),
  403. },
  404. }...,
  405. ),
  406. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  407. )
  408. server.AddRoutes(
  409. rest.WithMiddlewares(
  410. []rest.Middleware{serverCtx.Authority},
  411. []rest.Route{
  412. {
  413. Method: http.MethodPost,
  414. Path: "/sop_task/create",
  415. Handler: sop_task.CreateSopTaskHandler(serverCtx),
  416. },
  417. {
  418. Method: http.MethodPost,
  419. Path: "/sop_task/update",
  420. Handler: sop_task.UpdateSopTaskHandler(serverCtx),
  421. },
  422. {
  423. Method: http.MethodPost,
  424. Path: "/sop_task/delete",
  425. Handler: sop_task.DeleteSopTaskHandler(serverCtx),
  426. },
  427. {
  428. Method: http.MethodPost,
  429. Path: "/sop_task/list",
  430. Handler: sop_task.GetSopTaskListHandler(serverCtx),
  431. },
  432. {
  433. Method: http.MethodPost,
  434. Path: "/sop_task/record_list",
  435. Handler: sop_task.GetSopTaskRecordListHandler(serverCtx),
  436. },
  437. {
  438. Method: http.MethodPost,
  439. Path: "/sop_task",
  440. Handler: sop_task.GetSopTaskByIdHandler(serverCtx),
  441. },
  442. {
  443. Method: http.MethodPost,
  444. Path: "/sop_task/detail",
  445. Handler: sop_task.GetSopTaskDetailHandler(serverCtx),
  446. },
  447. {
  448. Method: http.MethodPost,
  449. Path: "/sop_task/publish",
  450. Handler: sop_task.PublishSopTaskHandler(serverCtx),
  451. },
  452. {
  453. Method: http.MethodPost,
  454. Path: "/sop_task/start",
  455. Handler: sop_task.SopTaskStartHandler(serverCtx),
  456. },
  457. {
  458. Method: http.MethodPost,
  459. Path: "/sop_task/stop",
  460. Handler: sop_task.SopTaskStopHandler(serverCtx),
  461. },
  462. {
  463. Method: http.MethodPost,
  464. Path: "/sop_task/copy",
  465. Handler: sop_task.SopTaskCopyHandler(serverCtx),
  466. },
  467. {
  468. Method: http.MethodPost,
  469. Path: "/sop_task/message_var",
  470. Handler: sop_task.GetSopMessageVarHandler(serverCtx),
  471. },
  472. {
  473. Method: http.MethodPost,
  474. Path: "/sop_task/outline",
  475. Handler: sop_task.GetSopTaskOutlineHandler(serverCtx),
  476. },
  477. {
  478. Method: http.MethodPost,
  479. Path: "/sop_task/test_node",
  480. Handler: sop_task.TestNodeHandler(serverCtx),
  481. },
  482. }...,
  483. ),
  484. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  485. )
  486. server.AddRoutes(
  487. rest.WithMiddlewares(
  488. []rest.Middleware{serverCtx.Authority},
  489. []rest.Route{
  490. {
  491. Method: http.MethodPost,
  492. Path: "/sop_stage/create",
  493. Handler: sop_stage.CreateSopStageHandler(serverCtx),
  494. },
  495. {
  496. Method: http.MethodPost,
  497. Path: "/sop_stage/update",
  498. Handler: sop_stage.UpdateSopStageHandler(serverCtx),
  499. },
  500. {
  501. Method: http.MethodPost,
  502. Path: "/sop_stage/delete",
  503. Handler: sop_stage.DeleteSopStageHandler(serverCtx),
  504. },
  505. {
  506. Method: http.MethodPost,
  507. Path: "/sop_stage/list",
  508. Handler: sop_stage.GetSopStageListHandler(serverCtx),
  509. },
  510. {
  511. Method: http.MethodPost,
  512. Path: "/sop_stage",
  513. Handler: sop_stage.GetSopStageByIdHandler(serverCtx),
  514. },
  515. {
  516. Method: http.MethodPost,
  517. Path: "/sop_stage/detail",
  518. Handler: sop_stage.GetSopStageDetailHandler(serverCtx),
  519. },
  520. {
  521. Method: http.MethodPost,
  522. Path: "/sop_stage/move",
  523. Handler: sop_stage.MoveSopStageHandler(serverCtx),
  524. },
  525. }...,
  526. ),
  527. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  528. )
  529. server.AddRoutes(
  530. rest.WithMiddlewares(
  531. []rest.Middleware{serverCtx.Authority},
  532. []rest.Route{
  533. {
  534. Method: http.MethodPost,
  535. Path: "/sop_node/create",
  536. Handler: sop_node.CreateSopNodeHandler(serverCtx),
  537. },
  538. {
  539. Method: http.MethodPost,
  540. Path: "/sop_node/update",
  541. Handler: sop_node.UpdateSopNodeHandler(serverCtx),
  542. },
  543. {
  544. Method: http.MethodPost,
  545. Path: "/sop_node/delete",
  546. Handler: sop_node.DeleteSopNodeHandler(serverCtx),
  547. },
  548. {
  549. Method: http.MethodPost,
  550. Path: "/sop_node/list",
  551. Handler: sop_node.GetSopNodeListHandler(serverCtx),
  552. },
  553. {
  554. Method: http.MethodPost,
  555. Path: "/sop_node/detail",
  556. Handler: sop_node.GetSopNodeDetailHandler(serverCtx),
  557. },
  558. }...,
  559. ),
  560. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  561. )
  562. server.AddRoutes(
  563. rest.WithMiddlewares(
  564. []rest.Middleware{serverCtx.Authority},
  565. []rest.Route{
  566. {
  567. Method: http.MethodPost,
  568. Path: "/message_records/create",
  569. Handler: message_records.CreateMessageRecordsHandler(serverCtx),
  570. },
  571. {
  572. Method: http.MethodPost,
  573. Path: "/message_records/update",
  574. Handler: message_records.UpdateMessageRecordsHandler(serverCtx),
  575. },
  576. {
  577. Method: http.MethodPost,
  578. Path: "/message_records/delete",
  579. Handler: message_records.DeleteMessageRecordsHandler(serverCtx),
  580. },
  581. {
  582. Method: http.MethodPost,
  583. Path: "/message_records/list",
  584. Handler: message_records.GetMessageRecordsListHandler(serverCtx),
  585. },
  586. {
  587. Method: http.MethodPost,
  588. Path: "/message_records",
  589. Handler: message_records.GetMessageRecordsByIdHandler(serverCtx),
  590. },
  591. }...,
  592. ),
  593. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  594. )
  595. server.AddRoutes(
  596. rest.WithMiddlewares(
  597. []rest.Middleware{serverCtx.Authority},
  598. []rest.Route{
  599. {
  600. Method: http.MethodPost,
  601. Path: "/chatroom_member/list",
  602. Handler: ChatRoomMember.GetChatroomMemberListHandler(serverCtx),
  603. },
  604. }...,
  605. ),
  606. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  607. )
  608. server.AddRoutes(
  609. []rest.Route{
  610. {
  611. Method: http.MethodPost,
  612. Path: "/api/user/login",
  613. Handler: User.DoApiUserLoginHandler(serverCtx),
  614. },
  615. },
  616. )
  617. server.AddRoutes(
  618. rest.WithMiddlewares(
  619. []rest.Middleware{serverCtx.Authority},
  620. []rest.Route{
  621. {
  622. Method: http.MethodGet,
  623. Path: "/user/info",
  624. Handler: User.GetUserInfoHandler(serverCtx),
  625. },
  626. }...,
  627. ),
  628. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  629. )
  630. server.AddRoutes(
  631. []rest.Route{
  632. {
  633. Method: http.MethodPost,
  634. Path: "/contact/getContactByWxid",
  635. Handler: openapi.OpenapiGetContactByWxidHandler(serverCtx),
  636. },
  637. {
  638. Method: http.MethodPost,
  639. Path: "/contact/getContactList",
  640. Handler: openapi.OpenapiGetContactListHandler(serverCtx),
  641. },
  642. },
  643. rest.WithPrefix("/openapi"),
  644. )
  645. server.AddRoutes(
  646. rest.WithMiddlewares(
  647. []rest.Middleware{serverCtx.Authority},
  648. []rest.Route{
  649. {
  650. Method: http.MethodPost,
  651. Path: "/batch_msg/create",
  652. Handler: batch_msg.CreateBatchMsgHandler(serverCtx),
  653. },
  654. {
  655. Method: http.MethodPost,
  656. Path: "/batch_msg/update",
  657. Handler: batch_msg.UpdateBatchMsgHandler(serverCtx),
  658. },
  659. {
  660. Method: http.MethodPost,
  661. Path: "/batch_msg/delete",
  662. Handler: batch_msg.DeleteBatchMsgHandler(serverCtx),
  663. },
  664. {
  665. Method: http.MethodPost,
  666. Path: "/batch_msg/list",
  667. Handler: batch_msg.GetBatchMsgListHandler(serverCtx),
  668. },
  669. {
  670. Method: http.MethodPost,
  671. Path: "/batch_msg",
  672. Handler: batch_msg.GetBatchMsgByIdHandler(serverCtx),
  673. },
  674. {
  675. Method: http.MethodPost,
  676. Path: "/batch_msg/stop",
  677. Handler: batch_msg.StopBatchMsgHandler(serverCtx),
  678. },
  679. }...,
  680. ),
  681. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  682. )
  683. server.AddRoutes(
  684. rest.WithMiddlewares(
  685. []rest.Middleware{serverCtx.Authority},
  686. []rest.Route{
  687. {
  688. Method: http.MethodPost,
  689. Path: "/msg/create",
  690. Handler: Msg.CreateMsgHandler(serverCtx),
  691. },
  692. {
  693. Method: http.MethodPost,
  694. Path: "/msg/update",
  695. Handler: Msg.UpdateMsgHandler(serverCtx),
  696. },
  697. {
  698. Method: http.MethodPost,
  699. Path: "/msg/delete",
  700. Handler: Msg.DeleteMsgHandler(serverCtx),
  701. },
  702. {
  703. Method: http.MethodPost,
  704. Path: "/msg/list",
  705. Handler: Msg.GetMsgListHandler(serverCtx),
  706. },
  707. {
  708. Method: http.MethodPost,
  709. Path: "/msg",
  710. Handler: Msg.GetMsgByIdHandler(serverCtx),
  711. },
  712. }...,
  713. ),
  714. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  715. )
  716. server.AddRoutes(
  717. []rest.Route{
  718. {
  719. Method: http.MethodPost,
  720. Path: "/api/employee/list",
  721. Handler: employee.GetApiEmployeeListHandler(serverCtx),
  722. },
  723. {
  724. Method: http.MethodPost,
  725. Path: "/api/employee/detail",
  726. Handler: employee.GetApiEmployeeDetailHandler(serverCtx),
  727. },
  728. },
  729. )
  730. server.AddRoutes(
  731. []rest.Route{
  732. {
  733. Method: http.MethodPost,
  734. Path: "/employee/search",
  735. Handler: employee.GetEmployeeSearchHandler(serverCtx),
  736. },
  737. {
  738. Method: http.MethodPost,
  739. Path: "/employee/search/test",
  740. Handler: employee.GetEmployeeSearchTestHandler(serverCtx),
  741. },
  742. {
  743. Method: http.MethodPost,
  744. Path: "/employee/detail",
  745. Handler: employee.GetEmployeeDetailHandler(serverCtx),
  746. },
  747. },
  748. )
  749. server.AddRoutes(
  750. rest.WithMiddlewares(
  751. []rest.Middleware{serverCtx.Authority},
  752. []rest.Route{
  753. {
  754. Method: http.MethodPost,
  755. Path: "/employee/create",
  756. Handler: employee.CreateEmployeeHandler(serverCtx),
  757. },
  758. {
  759. Method: http.MethodPost,
  760. Path: "/employee/update",
  761. Handler: employee.UpdateEmployeeHandler(serverCtx),
  762. },
  763. {
  764. Method: http.MethodPost,
  765. Path: "/employee/delete",
  766. Handler: employee.DeleteEmployeeHandler(serverCtx),
  767. },
  768. {
  769. Method: http.MethodPost,
  770. Path: "/employee/list",
  771. Handler: employee.GetEmployeeListHandler(serverCtx),
  772. },
  773. {
  774. Method: http.MethodPost,
  775. Path: "/employee",
  776. Handler: employee.GetEmployeeByIdHandler(serverCtx),
  777. },
  778. }...,
  779. ),
  780. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  781. )
  782. server.AddRoutes(
  783. rest.WithMiddlewares(
  784. []rest.Middleware{serverCtx.Authority},
  785. []rest.Route{
  786. {
  787. Method: http.MethodPost,
  788. Path: "/work_experience/create",
  789. Handler: work_experience.CreateWorkExperienceHandler(serverCtx),
  790. },
  791. {
  792. Method: http.MethodPost,
  793. Path: "/work_experience/update",
  794. Handler: work_experience.UpdateWorkExperienceHandler(serverCtx),
  795. },
  796. {
  797. Method: http.MethodPost,
  798. Path: "/work_experience/delete",
  799. Handler: work_experience.DeleteWorkExperienceHandler(serverCtx),
  800. },
  801. {
  802. Method: http.MethodPost,
  803. Path: "/work_experience/list",
  804. Handler: work_experience.GetWorkExperienceListHandler(serverCtx),
  805. },
  806. {
  807. Method: http.MethodPost,
  808. Path: "/work_experience",
  809. Handler: work_experience.GetWorkExperienceByIdHandler(serverCtx),
  810. },
  811. }...,
  812. ),
  813. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  814. )
  815. server.AddRoutes(
  816. rest.WithMiddlewares(
  817. []rest.Middleware{serverCtx.Authority},
  818. []rest.Route{
  819. {
  820. Method: http.MethodPost,
  821. Path: "/tutorial/create",
  822. Handler: tutorial.CreateTutorialHandler(serverCtx),
  823. },
  824. {
  825. Method: http.MethodPost,
  826. Path: "/tutorial/update",
  827. Handler: tutorial.UpdateTutorialHandler(serverCtx),
  828. },
  829. {
  830. Method: http.MethodPost,
  831. Path: "/tutorial/delete",
  832. Handler: tutorial.DeleteTutorialHandler(serverCtx),
  833. },
  834. {
  835. Method: http.MethodPost,
  836. Path: "/tutorial/list",
  837. Handler: tutorial.GetTutorialListHandler(serverCtx),
  838. },
  839. {
  840. Method: http.MethodPost,
  841. Path: "/tutorial",
  842. Handler: tutorial.GetTutorialByIdHandler(serverCtx),
  843. },
  844. }...,
  845. ),
  846. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  847. )
  848. server.AddRoutes(
  849. rest.WithMiddlewares(
  850. []rest.Middleware{serverCtx.Authority},
  851. []rest.Route{
  852. {
  853. Method: http.MethodGet,
  854. Path: "/employee_config/list",
  855. Handler: employee_config.GetEmployeeListConfigHandler(serverCtx),
  856. },
  857. }...,
  858. ),
  859. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  860. )
  861. server.AddRoutes(
  862. []rest.Route{
  863. {
  864. Method: http.MethodPost,
  865. Path: "/token/check",
  866. Handler: token.CheckTokenHandler(serverCtx),
  867. },
  868. },
  869. )
  870. server.AddRoutes(
  871. rest.WithMiddlewares(
  872. []rest.Middleware{serverCtx.Authority},
  873. []rest.Route{
  874. {
  875. Method: http.MethodPost,
  876. Path: "/token/third/create",
  877. Handler: token.CreateTokenHandler(serverCtx),
  878. },
  879. {
  880. Method: http.MethodPost,
  881. Path: "/token/third/update",
  882. Handler: token.UpdateTokenHandler(serverCtx),
  883. },
  884. {
  885. Method: http.MethodPost,
  886. Path: "/token/third/delete",
  887. Handler: token.DeleteTokenHandler(serverCtx),
  888. },
  889. {
  890. Method: http.MethodPost,
  891. Path: "/token/third/list",
  892. Handler: token.GetTokenListHandler(serverCtx),
  893. },
  894. {
  895. Method: http.MethodPost,
  896. Path: "/token/third/detail",
  897. Handler: token.GetTokenByIdHandler(serverCtx),
  898. },
  899. }...,
  900. ),
  901. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  902. )
  903. server.AddRoutes(
  904. []rest.Route{
  905. {
  906. Method: http.MethodPost,
  907. Path: "/category/list",
  908. Handler: category.GetCategoryListHandler(serverCtx),
  909. },
  910. {
  911. Method: http.MethodPost,
  912. Path: "/category",
  913. Handler: category.GetCategoryByIdHandler(serverCtx),
  914. },
  915. {
  916. Method: http.MethodPost,
  917. Path: "/api/category/list",
  918. Handler: category.GetApiCategoryListHandler(serverCtx),
  919. },
  920. },
  921. )
  922. server.AddRoutes(
  923. rest.WithMiddlewares(
  924. []rest.Middleware{serverCtx.Authority},
  925. []rest.Route{
  926. {
  927. Method: http.MethodPost,
  928. Path: "/category/create",
  929. Handler: category.CreateCategoryHandler(serverCtx),
  930. },
  931. {
  932. Method: http.MethodPost,
  933. Path: "/category/update",
  934. Handler: category.UpdateCategoryHandler(serverCtx),
  935. },
  936. {
  937. Method: http.MethodPost,
  938. Path: "/category/delete",
  939. Handler: category.DeleteCategoryHandler(serverCtx),
  940. },
  941. }...,
  942. ),
  943. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  944. )
  945. server.AddRoutes(
  946. rest.WithMiddlewares(
  947. []rest.Middleware{serverCtx.Authority},
  948. []rest.Route{
  949. {
  950. Method: http.MethodPost,
  951. Path: "/agent_base/create",
  952. Handler: agent_base.CreateAgentBaseHandler(serverCtx),
  953. },
  954. {
  955. Method: http.MethodPost,
  956. Path: "/agent_base/update",
  957. Handler: agent_base.UpdateAgentBaseHandler(serverCtx),
  958. },
  959. {
  960. Method: http.MethodPost,
  961. Path: "/agent_base/delete",
  962. Handler: agent_base.DeleteAgentBaseHandler(serverCtx),
  963. },
  964. {
  965. Method: http.MethodPost,
  966. Path: "/agent_base/list",
  967. Handler: agent_base.GetAgentBaseListHandler(serverCtx),
  968. },
  969. {
  970. Method: http.MethodPost,
  971. Path: "/agent_base",
  972. Handler: agent_base.GetAgentBaseByIdHandler(serverCtx),
  973. },
  974. }...,
  975. ),
  976. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  977. )
  978. server.AddRoutes(
  979. rest.WithMiddlewares(
  980. []rest.Middleware{serverCtx.Miniprogram},
  981. []rest.Route{
  982. {
  983. Method: http.MethodPost,
  984. Path: "/api/chat/create",
  985. Handler: chatrecords.SubmitApiChatHandler(serverCtx),
  986. },
  987. {
  988. Method: http.MethodPost,
  989. Path: "/api/chat/answer",
  990. Handler: chatrecords.AnswerApiChatHandler(serverCtx),
  991. },
  992. {
  993. Method: http.MethodPost,
  994. Path: "/api/chat/list",
  995. Handler: chatrecords.GetApiChatListHandler(serverCtx),
  996. },
  997. {
  998. Method: http.MethodPost,
  999. Path: "/api/chat/recommmend",
  1000. Handler: chatrecords.GetApiRecommendChatHandler(serverCtx),
  1001. },
  1002. }...,
  1003. ),
  1004. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1005. )
  1006. server.AddRoutes(
  1007. rest.WithMiddlewares(
  1008. []rest.Middleware{serverCtx.Authority},
  1009. []rest.Route{
  1010. {
  1011. Method: http.MethodPost,
  1012. Path: "/chat_records/create",
  1013. Handler: chatrecords.CreateChatRecordsHandler(serverCtx),
  1014. },
  1015. {
  1016. Method: http.MethodPost,
  1017. Path: "/chat_records/update",
  1018. Handler: chatrecords.UpdateChatRecordsHandler(serverCtx),
  1019. },
  1020. {
  1021. Method: http.MethodPost,
  1022. Path: "/chat_records/delete",
  1023. Handler: chatrecords.DeleteChatRecordsHandler(serverCtx),
  1024. },
  1025. {
  1026. Method: http.MethodPost,
  1027. Path: "/chat_records/list",
  1028. Handler: chatrecords.GetChatRecordsListHandler(serverCtx),
  1029. },
  1030. {
  1031. Method: http.MethodPost,
  1032. Path: "/chat_records",
  1033. Handler: chatrecords.GetChatRecordsByIdHandler(serverCtx),
  1034. },
  1035. }...,
  1036. ),
  1037. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1038. )
  1039. server.AddRoutes(
  1040. rest.WithMiddlewares(
  1041. []rest.Middleware{serverCtx.Miniprogram},
  1042. []rest.Route{
  1043. {
  1044. Method: http.MethodPost,
  1045. Path: "/api/session/list",
  1046. Handler: chatsession.GetApiSessionListHandler(serverCtx),
  1047. },
  1048. {
  1049. Method: http.MethodPost,
  1050. Path: "/api/session/update",
  1051. Handler: chatsession.UpdateApiSessionHandler(serverCtx),
  1052. },
  1053. {
  1054. Method: http.MethodPost,
  1055. Path: "/api/session/delete",
  1056. Handler: chatsession.DeleteApiSessionHandler(serverCtx),
  1057. },
  1058. }...,
  1059. ),
  1060. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1061. )
  1062. server.AddRoutes(
  1063. rest.WithMiddlewares(
  1064. []rest.Middleware{serverCtx.Authority},
  1065. []rest.Route{
  1066. {
  1067. Method: http.MethodPost,
  1068. Path: "/chat_session/create",
  1069. Handler: chatsession.CreateChatSessionHandler(serverCtx),
  1070. },
  1071. {
  1072. Method: http.MethodPost,
  1073. Path: "/chat_session/update",
  1074. Handler: chatsession.UpdateChatSessionHandler(serverCtx),
  1075. },
  1076. {
  1077. Method: http.MethodPost,
  1078. Path: "/chat_session/delete",
  1079. Handler: chatsession.DeleteChatSessionHandler(serverCtx),
  1080. },
  1081. {
  1082. Method: http.MethodPost,
  1083. Path: "/chat_session/list",
  1084. Handler: chatsession.GetChatSessionListHandler(serverCtx),
  1085. },
  1086. {
  1087. Method: http.MethodPost,
  1088. Path: "/chat_session",
  1089. Handler: chatsession.GetChatSessionByIdHandler(serverCtx),
  1090. },
  1091. }...,
  1092. ),
  1093. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1094. )
  1095. server.AddRoutes(
  1096. rest.WithMiddlewares(
  1097. []rest.Middleware{serverCtx.Miniprogram},
  1098. []rest.Route{
  1099. {
  1100. Method: http.MethodPost,
  1101. Path: "/api/card/detail",
  1102. Handler: wxcard.GetApiWxCardDetailHandler(serverCtx),
  1103. },
  1104. }...,
  1105. ),
  1106. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1107. )
  1108. server.AddRoutes(
  1109. []rest.Route{
  1110. {
  1111. Method: http.MethodGet,
  1112. Path: "/api/card/qrcode",
  1113. Handler: wxcard.GetApiWxCardQrcodeHandler(serverCtx),
  1114. },
  1115. },
  1116. )
  1117. server.AddRoutes(
  1118. rest.WithMiddlewares(
  1119. []rest.Middleware{serverCtx.Authority},
  1120. []rest.Route{
  1121. {
  1122. Method: http.MethodPost,
  1123. Path: "/wx_card/create",
  1124. Handler: wxcard.CreateWxCardHandler(serverCtx),
  1125. },
  1126. {
  1127. Method: http.MethodPost,
  1128. Path: "/wx_card/update",
  1129. Handler: wxcard.UpdateWxCardHandler(serverCtx),
  1130. },
  1131. {
  1132. Method: http.MethodPost,
  1133. Path: "/wx_card/delete",
  1134. Handler: wxcard.DeleteWxCardHandler(serverCtx),
  1135. },
  1136. {
  1137. Method: http.MethodPost,
  1138. Path: "/wx_card/list",
  1139. Handler: wxcard.GetWxCardListHandler(serverCtx),
  1140. },
  1141. {
  1142. Method: http.MethodPost,
  1143. Path: "/wx_card",
  1144. Handler: wxcard.GetWxCardByIdHandler(serverCtx),
  1145. },
  1146. }...,
  1147. ),
  1148. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1149. )
  1150. server.AddRoutes(
  1151. rest.WithMiddlewares(
  1152. []rest.Middleware{serverCtx.Miniprogram},
  1153. []rest.Route{
  1154. {
  1155. Method: http.MethodPost,
  1156. Path: "/api/user/update",
  1157. Handler: wxcarduser.UpdateApiWxCardUserHandler(serverCtx),
  1158. },
  1159. }...,
  1160. ),
  1161. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1162. )
  1163. server.AddRoutes(
  1164. rest.WithMiddlewares(
  1165. []rest.Middleware{serverCtx.Authority},
  1166. []rest.Route{
  1167. {
  1168. Method: http.MethodPost,
  1169. Path: "/wx_card_user/create",
  1170. Handler: wxcarduser.CreateWxCardUserHandler(serverCtx),
  1171. },
  1172. {
  1173. Method: http.MethodPost,
  1174. Path: "/wx_card_user/update",
  1175. Handler: wxcarduser.UpdateWxCardUserHandler(serverCtx),
  1176. },
  1177. {
  1178. Method: http.MethodPost,
  1179. Path: "/wx_card_user/delete",
  1180. Handler: wxcarduser.DeleteWxCardUserHandler(serverCtx),
  1181. },
  1182. {
  1183. Method: http.MethodPost,
  1184. Path: "/wx_card_user/list",
  1185. Handler: wxcarduser.GetWxCardUserListHandler(serverCtx),
  1186. },
  1187. {
  1188. Method: http.MethodPost,
  1189. Path: "/wx_card_user",
  1190. Handler: wxcarduser.GetWxCardUserByIdHandler(serverCtx),
  1191. },
  1192. }...,
  1193. ),
  1194. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1195. )
  1196. server.AddRoutes(
  1197. rest.WithMiddlewares(
  1198. []rest.Middleware{serverCtx.Miniprogram},
  1199. []rest.Route{
  1200. {
  1201. Method: http.MethodPost,
  1202. Path: "/api/card/visit",
  1203. Handler: wxcardvisit.SubmitApiWxCardVisitHandler(serverCtx),
  1204. },
  1205. {
  1206. Method: http.MethodPost,
  1207. Path: "/api/card/visit/history",
  1208. Handler: wxcardvisit.GetApiWxCardVisitListHandler(serverCtx),
  1209. },
  1210. }...,
  1211. ),
  1212. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1213. )
  1214. server.AddRoutes(
  1215. rest.WithMiddlewares(
  1216. []rest.Middleware{serverCtx.Authority},
  1217. []rest.Route{
  1218. {
  1219. Method: http.MethodPost,
  1220. Path: "/wx_card_visit/create",
  1221. Handler: wxcardvisit.CreateWxCardVisitHandler(serverCtx),
  1222. },
  1223. {
  1224. Method: http.MethodPost,
  1225. Path: "/wx_card_visit/update",
  1226. Handler: wxcardvisit.UpdateWxCardVisitHandler(serverCtx),
  1227. },
  1228. {
  1229. Method: http.MethodPost,
  1230. Path: "/wx_card_visit/delete",
  1231. Handler: wxcardvisit.DeleteWxCardVisitHandler(serverCtx),
  1232. },
  1233. {
  1234. Method: http.MethodPost,
  1235. Path: "/wx_card_visit/list",
  1236. Handler: wxcardvisit.GetWxCardVisitListHandler(serverCtx),
  1237. },
  1238. {
  1239. Method: http.MethodPost,
  1240. Path: "/wx_card_visit",
  1241. Handler: wxcardvisit.GetWxCardVisitByIdHandler(serverCtx),
  1242. },
  1243. }...,
  1244. ),
  1245. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1246. )
  1247. server.AddRoutes(
  1248. rest.WithMiddlewares(
  1249. []rest.Middleware{serverCtx.Miniprogram},
  1250. []rest.Route{
  1251. {
  1252. Method: http.MethodPost,
  1253. Path: "/api/avatar/config",
  1254. Handler: avatar.GetApiAvatarConfigHandler(serverCtx),
  1255. },
  1256. {
  1257. Method: http.MethodPost,
  1258. Path: "/api/avatar/sts",
  1259. Handler: avatar.GetAcsResponseHandler(serverCtx),
  1260. },
  1261. {
  1262. Method: http.MethodPost,
  1263. Path: "/api/avatar/signature",
  1264. Handler: avatar.GetSignatureResponseHandler(serverCtx),
  1265. },
  1266. }...,
  1267. ),
  1268. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1269. )
  1270. server.AddRoutes(
  1271. rest.WithMiddlewares(
  1272. []rest.Middleware{serverCtx.Authority},
  1273. []rest.Route{
  1274. {
  1275. Method: http.MethodPost,
  1276. Path: "/aliyun_avatar/create",
  1277. Handler: aliyun_avatar.CreateAliyunAvatarHandler(serverCtx),
  1278. },
  1279. {
  1280. Method: http.MethodPost,
  1281. Path: "/aliyun_avatar/update",
  1282. Handler: aliyun_avatar.UpdateAliyunAvatarHandler(serverCtx),
  1283. },
  1284. {
  1285. Method: http.MethodPost,
  1286. Path: "/aliyun_avatar/delete",
  1287. Handler: aliyun_avatar.DeleteAliyunAvatarHandler(serverCtx),
  1288. },
  1289. {
  1290. Method: http.MethodPost,
  1291. Path: "/aliyun_avatar/list",
  1292. Handler: aliyun_avatar.GetAliyunAvatarListHandler(serverCtx),
  1293. },
  1294. {
  1295. Method: http.MethodPost,
  1296. Path: "/aliyun_avatar",
  1297. Handler: aliyun_avatar.GetAliyunAvatarByIdHandler(serverCtx),
  1298. },
  1299. }...,
  1300. ),
  1301. rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
  1302. )
  1303. }