This commit is contained in:
+6
-6
@@ -486,17 +486,17 @@ func (s *LogService) EditPost(ctx context.Context, id string, update models.Post
|
||||
|
||||
ctx = s.authService.SpinOffContext(ctx)
|
||||
go func() {
|
||||
l, err := s.logs.Find(context.Background(), post.LogID)
|
||||
ctx, cancel := context.WithTimeout(ctx, time.Minute*10)
|
||||
defer cancel()
|
||||
|
||||
l, err := s.logs.Find(ctx, post.LogID)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
timeout, cancel := context.WithTimeout(context.Background(), time.Minute*10)
|
||||
defer cancel()
|
||||
s.changeService.Submit(ctx, models.ChangeModelPost, "edit", true, changekeys.Many(l, post), post)
|
||||
|
||||
s.changeService.Submit(timeout, models.ChangeModelPost, "edit", true, changekeys.Many(l, post), post)
|
||||
|
||||
_, err = s.refreshLogCharacters(timeout, *l, nil, false)
|
||||
_, err = s.refreshLogCharacters(ctx, *l, nil, false)
|
||||
if err != nil {
|
||||
log.Printf("Failed to update characters in log %s: %s", l.ID, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user