Skip to content
Snippets Groups Projects
Verified Commit 9e7a215d authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

improve range variable

parent 8145bb78
No related branches found
No related tags found
No related merge requests found
......@@ -63,14 +63,14 @@ func handleRecreate(ctx *fiber.Ctx, code string) (err error) {
now := unixtime.Now()
diff := now - created
for i, r := range data.Restrictions {
apiR := &r.Restriction
apiR := r.Restriction
if r.NotBefore != 0 {
apiR.NotBefore = int64(r.NotBefore + diff)
}
if r.ExpiresAt != 0 {
apiR.ExpiresAt = int64(r.ExpiresAt + diff)
}
restr[i] = apiR
restr[i] = &apiR
}
req.Restrictions = restr
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment