diff options
author | FChannel <> | 2022-07-03 21:20:13 -0700 |
---|---|---|
committer | FChannel <> | 2022-07-03 21:20:13 -0700 |
commit | 65553482ceb3c61122e809128b66e9ee50d94891 (patch) | |
tree | a4022fde6754b7fb61f66cb5a234f34977b7f1a2 /route/routes | |
parent | b0261cf6c6298f472cfca8ae75e6d01ed39b421e (diff) |
added key required for verify/auth routes
Diffstat (limited to 'route/routes')
-rw-r--r-- | route/routes/admin.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/route/routes/admin.go b/route/routes/admin.go index 0b05fbf..1deff55 100644 --- a/route/routes/admin.go +++ b/route/routes/admin.go @@ -29,7 +29,7 @@ func AdminVerify(ctx *fiber.Ctx) error { j, _ := json.Marshal(&verify) - req, err := http.NewRequest("POST", config.Domain+"/auth", bytes.NewBuffer(j)) + req, err := http.NewRequest("POST", config.Domain+"/"+config.Key+"/auth", bytes.NewBuffer(j)) if err != nil { return util.MakeError(err, "AdminVerify") @@ -94,7 +94,7 @@ func AdminIndex(ctx *fiber.Ctx) error { } if id == "" || (id != actor.Id && id != config.Domain) { - return ctx.Render("verify", fiber.Map{}) + return ctx.Render("verify", fiber.Map{"key": config.Key}) } actor, err := activitypub.GetActor(config.Domain) @@ -252,7 +252,7 @@ func AdminActorIndex(ctx *fiber.Ctx) error { hasAuth, data.Board.ModCred = util.HasAuth(pass, actor.Id) if !hasAuth || (id != actor.Id && id != config.Domain) { - return ctx.Render("verify", fiber.Map{}) + return ctx.Render("verify", fiber.Map{"key": config.Key}) } reqActivity := activitypub.Activity{Id: actor.Following} |