UPDATE: Fix bug cache
All checks were successful
Build and Release / release (push) Successful in 1m31s
All checks were successful
Build and Release / release (push) Successful in 1m31s
This commit is contained in:
@@ -165,6 +165,8 @@ func (r *mediaRepository) Create(ctx context.Context, params sqlc.CreateMediaPar
|
|||||||
_ = r.c.DelByPattern(bgCtx, "media:count*")
|
_ = r.c.DelByPattern(bgCtx, "media:count*")
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
_ = r.c.Del(ctx, fmt.Sprintf("media:userId:%s", convert.UUIDToString(params.UserID)))
|
||||||
|
|
||||||
media := models.MediaEntity{
|
media := models.MediaEntity{
|
||||||
ID: convert.UUIDToString(row.ID),
|
ID: convert.UUIDToString(row.ID),
|
||||||
UserID: convert.UUIDToString(row.UserID),
|
UserID: convert.UUIDToString(row.UserID),
|
||||||
|
|||||||
@@ -212,6 +212,8 @@ func (v *verificationRepository) Create(ctx context.Context, params sqlc.CreateU
|
|||||||
_ = v.c.DelByPattern(bgCtx, "verification:count*")
|
_ = v.c.DelByPattern(bgCtx, "verification:count*")
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
_ = v.c.Del(ctx, fmt.Sprintf("verification:userId:%s", convert.UUIDToString(params.UserID)))
|
||||||
|
|
||||||
return &verification, nil
|
return &verification, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -246,7 +248,7 @@ func (v *verificationRepository) BulkVerificationMediaByMediaId(ctx context.Cont
|
|||||||
if len(ids) == 0 {
|
if len(ids) == 0 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
listCacheId := make([]string, 0)
|
listCacheId := make([]string, 0)
|
||||||
for _, it := range ids {
|
for _, it := range ids {
|
||||||
id := convert.UUIDToString(it)
|
id := convert.UUIDToString(it)
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ func (s *commitService) RestoreCommit(ctx context.Context, userID string, projec
|
|||||||
return fiber.NewError(fiber.StatusInternalServerError, "Failed to restore commit")
|
return fiber.NewError(fiber.StatusInternalServerError, "Failed to restore commit")
|
||||||
}
|
}
|
||||||
|
|
||||||
_ = s.c.Del(ctx, fmt.Sprintf("project:id:%s", projectID))
|
_ = s.c.Del(ctx, fmt.Sprintf("project:id:%s", projectID), fmt.Sprintf("commit:project:%s", projectID))
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -175,6 +175,8 @@ func (s *submissionService) CreateSubmission(ctx context.Context, userID string,
|
|||||||
return nil, fiber.NewError(fiber.StatusInternalServerError, "Failed to create submission")
|
return nil, fiber.NewError(fiber.StatusInternalServerError, "Failed to create submission")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ = s.c.Del(ctx, fmt.Sprintf("project:id:%s", project.ID))
|
||||||
|
|
||||||
return submission.ToResponse(), nil
|
return submission.ToResponse(), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user