fix: wechat verify
This commit is contained in:
@@ -100,3 +100,14 @@ func (ctl *Controller) Login(ctx fiber.Ctx, code, state, redirectUri string) err
|
||||
|
||||
return ctx.Redirect().To(redirectUri)
|
||||
}
|
||||
|
||||
// @Router /MP_verify_:uuid.txt [get]
|
||||
// @Bind uuid path
|
||||
func (ctl *Controller) Verify(ctx fiber.Ctx, uuid string) error {
|
||||
v, err := ctl.wechat.VerifySite(uuid)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return ctx.SendString(v)
|
||||
}
|
||||
|
||||
@@ -40,4 +40,9 @@ func (r *Routes) Register(router fiber.Router) {
|
||||
QueryParam[string]("redirectUri"),
|
||||
))
|
||||
|
||||
router.Get("/MP_verify_:uuid.txt", Func1(
|
||||
r.controller.Verify,
|
||||
PathParam[string]("uuid"),
|
||||
))
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user