make checkInvite check only one invite, invite daemon

checkInvite no longer loops over all invites and checks for expiry, that
functionality has moved to checkInvites. Couple more rogue print
statements removed aswell.
This commit is contained in:
Harvey Tindall
2020-08-01 15:22:30 +01:00
parent dba20bd3ea
commit 4e16f6fd48
6 changed files with 113 additions and 71 deletions

View File

@@ -16,9 +16,6 @@ func (ctx *appContext) webAuth() gin.HandlerFunc {
}
func (ctx *appContext) authenticate(gc *gin.Context) {
for _, val := range ctx.users {
fmt.Println("userid", val.UserID)
}
header := strings.SplitN(gc.Request.Header.Get("Authorization"), " ", 2)
if header[0] != "Basic" {
ctx.debug.Println("Invalid authentication header")