fix(challenge/preact): fix build in ci

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso
2025-08-29 19:58:10 +00:00
parent f5c8614c61
commit 09b6cfc324
3 changed files with 5 additions and 1 deletions

View File

@@ -60,7 +60,7 @@ func (i *impl) Validate(r *http.Request, lg *slog.Logger, in *challenge.Validate
wantTime := in.Challenge.IssuedAt.Add(time.Duration(in.Rule.Challenge.Difficulty) * 95 * time.Millisecond)
if time.Now().Before(wantTime) {
return challenge.NewError("validate", "insufficent time", fmt.Errorf("%s: wanted user to wait until at least %s", wantTime.Format(time.RFC3339)))
return challenge.NewError("validate", "insufficent time", fmt.Errorf("%w: wanted user to wait until at least %s", challenge.ErrFailed, wantTime.Format(time.RFC3339)))
}
got := r.FormValue("result")

View File

@@ -9,6 +9,8 @@ set -u
(
cd ../.. && \
npm ci && \
npm run assets \
ko build --platform=all --base-import-paths --tags="latest" --image-user=1000 --image-annotation="" --image-label="" ./cmd/anubis -L
)

View File

@@ -9,6 +9,8 @@ set -u
(
cd ../.. && \
npm ci && \
npm run assets \
ko build --platform=all --base-import-paths --tags="latest" --image-user=1000 --image-annotation="" --image-label="" ./cmd/anubis -L
)