Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enrollment CheckIn: Add SMSOptedIn field #1068

Merged
merged 4 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 6 additions & 10 deletions Gordon360/Controllers/AcademicCheckInController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,19 @@ public async Task<ActionResult<EmergencyContactViewModel>> PutEmergencyContactAs

}



/// <summary> Sets the students cell phone number</summary>
/// <param name="data"> The phone number object to be added to the database </param>
/// <returns> The data stored </returns>
[HttpPut]
[Route("cellphone")]
public async Task<ActionResult<AcademicCheckInViewModel>> PutCellPhoneAsync([FromBody] AcademicCheckInViewModel data)
public async Task<ActionResult> PutCellPhoneAsync([FromBody] MobilePhoneUpdateViewModel data)
{
var username = AuthUtils.GetUsername(User);
var id = accountService.GetAccountByUsername(username).GordonID;

try
{
var result = await academicCheckInService.PutCellPhoneAsync(id, data);
return Ok(result);
await academicCheckInService.PutCellPhoneAsync(id, data);
return Ok();
}
catch (System.Exception e)
{
Expand Down Expand Up @@ -91,22 +88,21 @@ public async Task<ActionResult<AcademicCheckInViewModel>> PutDemographicAsync([F
/// <returns> The user's stored holds </returns>
[HttpGet]
[Route("holds")]
public async Task<ActionResult<AcademicCheckInViewModel>> GetHoldsAsync()
public async Task<ActionResult<EnrollmentCheckinHolds>> GetHoldsAsync()
{
var username = AuthUtils.GetUsername(User);
var id = accountService.GetAccountByUsername(username).GordonID;

try
{
var result = (await academicCheckInService.GetHoldsAsync(id)).First();
return Ok(result);
EnrollmentCheckinHolds holds = await academicCheckInService.GetHoldsAsync(id);
return Ok(holds);
}
catch (System.Exception e)
{
System.Diagnostics.Debug.WriteLine(e.Message);
return NotFound();
}

}

/// <summary> Sets the user as having completed Academic Checkin </summary>
Expand Down
61 changes: 57 additions & 4 deletions Gordon360/Documentation/Gordon360.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gordon360/Models/CCT/Context/CCTContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
entity.Property(e => e.JOB_NAME).IsFixedLength();
entity.Property(e => e.PART_CDE).IsFixedLength();
entity.Property(e => e.SESS_CDE).IsFixedLength();
entity.Property(e => e.USER_NAME).IsFixedLength();
});

modelBuilder.Entity<Mailboxes>(entity =>
Expand Down Expand Up @@ -611,7 +612,6 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
});
modelBuilder.HasSequence("Information_Change_Request_Seq");

OnModelCreatingGeneratedProcedures(modelBuilder);
OnModelCreatingPartial(modelBuilder);
}

Expand Down
Loading
Loading