From 15750acec06e529a543672cf12db08f471288a1c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sun, 18 Feb 2024 00:04:28 -0500 Subject: [PATCH] fix: check for error --- protocols/s5/tus.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/protocols/s5/tus.go b/protocols/s5/tus.go index 4c3a815..b312285 100644 --- a/protocols/s5/tus.go +++ b/protocols/s5/tus.go @@ -245,6 +245,10 @@ func (t *TusHandler) UploadCompleted(ctx context.Context, uploadID string) error result = t.db.WithContext(ctx).Model(&models.TusUpload{}).Where(find).Update("completed", true) + if result.Error != nil { + return result.Error + } + return nil } func (t *TusHandler) DeleteUpload(ctx context.Context, uploadID string) error {