Skip to content

Commit 4ccf628

Browse files
committed
Merge branch 'master' into analytics-consent
2 parents 3006ac0 + 117e235 commit 4ccf628

File tree

11 files changed

+118
-99
lines changed

11 files changed

+118
-99
lines changed

.github/workflows/backend.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,13 @@ jobs:
3131
builds.dotnet.microsoft.com:443
3232
dc.services.visualstudio.com:443
3333
deb.debian.org:80
34-
dotnetbuilds.azureedge.net:443
35-
dotnetcli.azureedge.net:443
3634
github.com:443
3735
md-hdd-t032zjxllntc.z26.blob.storage.azure.net:443
3836
objects.githubusercontent.com:443
3937
- name: Checkout repository
4038
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4139
- name: Setup dotnet
42-
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
40+
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
4341
with:
4442
dotnet-version: ${{ matrix.dotnet }}
4543
- name: Install ffmpeg
@@ -113,15 +111,14 @@ jobs:
113111
api.nuget.org:443
114112
builds.dotnet.microsoft.com:443
115113
dc.services.visualstudio.com:443
116-
dotnetcli.azureedge.net:443
117114
github.com:443
118115
objects.githubusercontent.com:443
119116
- name: Checkout repository
120117
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
121118
# Manually install .NET to work around:
122119
# https://github.com/github/codeql-action/issues/757
123120
- name: Setup .NET
124-
uses: actions/setup-dotnet@6bd8b7f7774af54e05809fcc5431931b3eb1ddee # v4.0.1
121+
uses: actions/setup-dotnet@87b7050bc53ea08284295505d98d2aa94301e852 # v4.2.0
125122
with:
126123
dotnet-version: "8.0.x"
127124
- name: Initialize CodeQL

.github/workflows/deploy_qa.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ jobs:
3434
api.nuget.org:443
3535
archive.ubuntu.com:80
3636
auth.docker.io:443
37-
codecov.io:443
3837
dc.services.visualstudio.com:443
3938
deb.debian.org:80
4039
docker.io:443
41-
dotnetcli.azureedge.net:443
4240
files.pythonhosted.org:443
4341
github.com:443
4442
mcr.microsoft.com:443
@@ -51,7 +49,6 @@ jobs:
5149
security.ubuntu.com:80
5250
storage.googleapis.com:443
5351
sts.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com:443
54-
uploader.codecov.io:443
5552
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5653
with:
5754
fetch-depth: 0

.github/workflows/deploy_release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,14 @@ jobs:
2727
*.actions.githubusercontent.com:443
2828
*.cloudfront.net:443
2929
*.data.mcr.microsoft.com:443
30-
api.ecr-public.us-east-1.amazonaws.com:443
30+
api.ecr-public.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com:443
3131
api.github.com:443
3232
api.nuget.org:443
3333
archive.ubuntu.com:80
3434
auth.docker.io:443
3535
dc.services.visualstudio.com:443
3636
deb.debian.org:80
3737
docker.io:443
38-
dotnetcli.azureedge.net:443
3938
files.pythonhosted.org:443
4039
github.com:443
4140
mcr.microsoft.com:443
@@ -47,7 +46,7 @@ jobs:
4746
security.debian.org:80
4847
security.ubuntu.com:80
4948
storage.googleapis.com:443
50-
sts.us-east-1.amazonaws.com:443
49+
sts.${{ secrets.AWS_DEFAULT_REGION }}.amazonaws.com:443
5150
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
5251
- name: Build The Combine
5352
id: build_combine

Backend/Controllers/SpeakerController.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Microsoft.AspNetCore.Authorization;
88
using Microsoft.AspNetCore.Http;
99
using Microsoft.AspNetCore.Mvc;
10+
using Microsoft.AspNetCore.Mvc.ModelBinding;
1011

1112
namespace BackendFramework.Controllers
1213
{
@@ -96,9 +97,9 @@ public async Task<IActionResult> GetSpeaker(string projectId, string speakerId)
9697

9798
/// <summary> Creates a <see cref="Speaker"/> for the specified projectId </summary>
9899
/// <returns> Id of created Speaker </returns>
99-
[HttpGet("create/{name}", Name = "CreateSpeaker")]
100+
[HttpPut("create", Name = "CreateSpeaker")]
100101
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(string))]
101-
public async Task<IActionResult> CreateSpeaker(string projectId, string name)
102+
public async Task<IActionResult> CreateSpeaker(string projectId, [FromBody, BindRequired] string name)
102103
{
103104
// Check permissions
104105
if (!await _permissionService.HasProjectPermission(
@@ -193,9 +194,10 @@ public async Task<IActionResult> RemoveConsent(string projectId, string speakerI
193194

194195
/// <summary> Updates the <see cref="Speaker"/>'s name for the specified projectId and speakerId </summary>
195196
/// <returns> Id of updated Speaker </returns>
196-
[HttpGet("update/{speakerId}/{name}", Name = "UpdateSpeakerName")]
197+
[HttpPut("update/{speakerId}", Name = "UpdateSpeakerName")]
197198
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(string))]
198-
public async Task<IActionResult> UpdateSpeakerName(string projectId, string speakerId, string name)
199+
public async Task<IActionResult> UpdateSpeakerName(
200+
string projectId, string speakerId, [FromBody, BindRequired] string name)
199201
{
200202
// Check permissions
201203
if (!await _permissionService.HasProjectPermission(

Backend/Controllers/UserController.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ public async Task<IActionResult> GetUser(string userId)
154154
}
155155

156156
/// <summary> Returns <see cref="User"/> with the specified email address. </summary>
157-
[HttpGet("getemail/{email}", Name = "GetUserByEmail")]
157+
[HttpPut("getbyemail", Name = "GetUserByEmail")]
158158
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(User))]
159-
public async Task<IActionResult> GetUserByEmail(string email)
159+
public async Task<IActionResult> GetUserByEmail([FromBody, BindRequired] string email)
160160
{
161161
if (!_permissionService.IsCurrentUserAuthorized(HttpContext))
162162
{
@@ -200,17 +200,17 @@ public async Task<IActionResult> CreateUser([FromBody, BindRequired] User user)
200200

201201
/// <summary> Checks whether specified email address is taken or empty. </summary>
202202
[AllowAnonymous]
203-
[HttpGet("isemailtaken/{email}", Name = "IsEmailUnavailable")]
203+
[HttpPut("isemailtaken", Name = "IsEmailUnavailable")]
204204
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(bool))]
205-
public async Task<IActionResult> IsEmailUnavailable(string email)
205+
public async Task<IActionResult> IsEmailUnavailable([FromBody, BindRequired] string email)
206206
{
207207
var isUnavailable = string.IsNullOrWhiteSpace(email) || await _userRepo.GetUserByEmail(email) is not null;
208208
return Ok(isUnavailable);
209209
}
210210

211211
/// <summary> Updates <see cref="User"/> with specified id. </summary>
212212
/// <returns> Id of updated user. </returns>
213-
[HttpPut("{userId}", Name = "UpdateUser")]
213+
[HttpPut("updateuser/{userId}", Name = "UpdateUser")]
214214
[ProducesResponseType(StatusCodes.Status200OK, Type = typeof(string))]
215215
public async Task<IActionResult> UpdateUser(string userId, [FromBody, BindRequired] User user)
216216
{

Backend/Controllers/UserRoleController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public async Task<IActionResult> ChangeOwner(string projectId, string oldUserId,
366366
if (newResult != ResultOfUpdate.Updated)
367367
{
368368
return StatusCode(StatusCodes.Status304NotModified, newRoleId);
369-
};
369+
}
370370

371371
// Change the old owner to a project admin
372372
oldUserRole.Role = Role.Administrator;

0 commit comments

Comments
 (0)