basestructure

This commit is contained in:
Michael McGuinness
2025-01-07 16:12:18 +00:00
parent e09a75c216
commit d6fd74ac2d
7 changed files with 92 additions and 18 deletions
+6 -1
View File
@@ -42,7 +42,7 @@ func (s *Service) submitCreate(ctx context.Context, entity *queryprocessor.Creat
if err != nil {
return uuid.Nil, err
}
defer tx.Rollback(ctx)
// defer tx.Rollback(ctx)
qtx := s.db.Queries.WithTx(tx)
@@ -73,6 +73,11 @@ func (s *Service) submitCreate(ctx context.Context, entity *queryprocessor.Creat
}
}
err = tx.Commit(ctx)
if err != nil {
return uuid.Nil, err
}
id := database.MustToUUID(dbID)
return id, nil