Skip to content

Commit

Permalink
formid to guid migration
Browse files Browse the repository at this point in the history
  • Loading branch information
Eliran-Turgeman committed Dec 7, 2024
1 parent 32a43c0 commit 2c50d8f
Show file tree
Hide file tree
Showing 63 changed files with 266 additions and 5,471 deletions.
2 changes: 1 addition & 1 deletion EmailCollector.Api/Controllers/EmailSignupsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public EmailSignupsController(IEmailSignupService emailSignupService,
[HttpGet("form/{formId}")]
[Produces("application/json")]
[ServiceFilter(typeof(ApiKeyAuthFilter))]
public async Task<IActionResult> GetFormEmailSignups(int formId)
public async Task<IActionResult> GetFormEmailSignups(Guid formId)
{
_logger.LogInformation($"Getting email signups for form {formId}.");

Expand Down
6 changes: 3 additions & 3 deletions EmailCollector.Api/Controllers/SignupFormsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public async Task<ActionResult<IEnumerable<FormDto>>> GetSignupForms()
[HttpGet("{id}")]
[Produces("application/json")]
[ServiceFilter(typeof(ApiKeyAuthFilter))]
public async Task<ActionResult<SignupForm>> GetSignupForm(int id)
public async Task<ActionResult<SignupForm>> GetSignupForm(Guid id)
{
_logger.LogInformation($"Getting signup form {id}.");

Expand Down Expand Up @@ -147,7 +147,7 @@ public async Task<ActionResult<FormDetailsDto>> PostSignupForm(CreateFormDto sig
/// <response code="400">If the user is not authenticated.</response>
[HttpDelete("{id}")]
[ServiceFilter(typeof(ApiKeyAuthFilter))]
public async Task<IActionResult> DeleteSignupForm(int id)
public async Task<IActionResult> DeleteSignupForm(Guid id)
{
_logger.LogInformation($"Deleting signup form {id}.");

Expand Down Expand Up @@ -195,7 +195,7 @@ public async Task<IActionResult> DeleteSignupForm(int id)
/// </remarks>
[HttpPut("{id}")]
[ServiceFilter(typeof(ApiKeyAuthFilter))]
public async Task<IActionResult> PutSignupForm(int id, CreateFormDto signupForm)
public async Task<IActionResult> PutSignupForm(Guid id, CreateFormDto signupForm)
{
_logger.LogInformation($"Updating signup form {id}.");

Expand Down
2 changes: 1 addition & 1 deletion EmailCollector.Api/DTOs/EmailSignupDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ namespace EmailCollector.Api.DTOs;
public class EmailSignupDto
{
[Required]
public int FormId { get; set; }
public Guid FormId { get; set; }

[Required]
public required string Email { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion EmailCollector.Api/DTOs/FormDetailsDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace EmailCollector.Api.DTOs;
/// </summary>
public class FormDetailsDto
{
public int Id { get; set; }
public Guid Id { get; set; }

public required string FormName { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion EmailCollector.Api/DTOs/FormDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/// </summary>
public class FormDto
{
public int Id { get; set; }
public Guid Id { get; set; }

public required string FormName { get; set; }
}
2 changes: 1 addition & 1 deletion EmailCollector.Api/DTOs/FormSubmissionsDataDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace EmailCollector.Api.DTOs;
public class FormSubmissionsDataDto : IExportable
{
[ExportField("Form ID")]
public int Id { get; set; }
public Guid Id { get; set; }

[ExportField("Form Name")]
public required string FormName { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion EmailCollector.Api/DTOs/FormSummaryDetailsDto.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class FormSummaryDetailsDto : IExportable
/// The unique identifier for the form.
/// </summary>
[ExportField("Form ID")]
public int Id { get; set; }
public Guid Id { get; set; }

/// <summary>
/// The name of the form.
Expand Down

This file was deleted.

67 changes: 0 additions & 67 deletions EmailCollector.Api/Migrations/20241003201713_InitialCreate.cs

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions EmailCollector.Api/Migrations/20241004055254_changeTypeToIList.cs

This file was deleted.

Loading

0 comments on commit 2c50d8f

Please sign in to comment.