Skip to content

Commit

Permalink
Revert "got the drop down menus Public/FacStaff/Private to work again"
Browse files Browse the repository at this point in the history
This reverts commit a937cfd.
  • Loading branch information
Tsion Tezera committed Jun 7, 2024
1 parent a937cfd commit d706e46
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion Gordon360/Controllers/ProfilesController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ public async Task<ActionResult<UserPrivacyUpdateViewModel>> UpdateUserPrivacyAsy
/// </summary>
/// <returns> All visibility groups (Public, FacStaff, Private)</returns>
[HttpGet]
[Route("visibility_group")]
[Route("visibility_groups")]
public ActionResult<IEnumerable<string>> GetVisibilityGroup()
{
var groups = context.UserPrivacy_Visibility_Groups.Select(up_v_g => up_v_g.Group)
Expand Down
34 changes: 17 additions & 17 deletions Gordon360/Controllers/StudentEmploymentController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@

namespace Gordon360.Controllers;

[Route("api/[controller]")]
public class StudentEmploymentController(IStudentEmploymentService studentEmploymentService) : GordonControllerBase
[Route("api/[controller]")]
public class StudentEmploymentController(IStudentEmploymentService studentEmploymentService) : GordonControllerBase
{

/// <summary>
/// Gets student employment information about the user
/// </summary>
/// <returns>A Student Employment Json</returns>
[HttpGet]
[Route("")]
public async Task<ActionResult<StudentEmploymentViewModel>> GetAsync()
{
var authenticatedUserUsername = AuthUtils.GetUsername(User);

/// <summary>
/// Gets student employment information about the user
/// </summary>
/// <returns>A Student Employment Json</returns>
[HttpGet]
[Route("")]
public async Task<ActionResult<StudentEmploymentViewModel>> GetAsync()
var result = await studentEmploymentService.GetEmploymentAsync(authenticatedUserUsername);
if (result == null)
{
var authenticatedUserUsername = AuthUtils.GetUsername(User);

var result = await studentEmploymentService.GetEmploymentAsync(authenticatedUserUsername);
if (result == null)
{
return NotFound();
}
return Ok(result);
return NotFound();
}
return Ok(result);
}
}

0 comments on commit d706e46

Please sign in to comment.