Skip to content
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
13 changes: 13 additions & 0 deletions infra/modules/compute.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,19 @@ resource apiAppSettings 'Microsoft.Web/sites/config@2023-12-01' = {
}
}

resource apiAppAuthSettings 'Microsoft.Web/sites/config@2023-12-01' = {
parent: apiApp
name: 'authsettingsV2'
properties: {
globalValidation: {
requireAuthentication: false
}
platform: {
enabled: false
}
}
}

output webAppUrl string = webApp.properties.defaultHostName
output apiAppUrl string = apiApp.properties.defaultHostName
output apiAppId string = apiApp.id
Expand Down
4 changes: 4 additions & 0 deletions src/frontend/Sudoku.Blazor/Services/GameStatisticsManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public partial class GameManager : IGameStatisticsManager
/// <returns>A task that represents the asynchronous operation of ending the session.</returns>
public async Task EndSession()
{
if (Game == null) return;
Game.Status = Game.IsSolved() ? GameStatus.Completed : GameStatus.Abandoned;
gameTimer.OnTick -= OnTimerTick;
gameTimer.Reset();
Expand All @@ -45,6 +46,7 @@ public async Task EndSession()
/// <returns>A task that represents the asynchronous operation.</returns>
public async Task PauseSession()
{
if (Game == null) return;
Game.Status = GameStatus.Paused;
gameTimer.OnTick -= OnTimerTick;
gameTimer.Pause();
Expand Down Expand Up @@ -76,6 +78,7 @@ public async Task RecordMove(int row, int column, int? value, bool isValid)
/// <returns>A task that represents the asynchronous operation. The task completes when the session is successfully resumed.</returns>
public Task ResumeSession()
{
if (Game == null) return Task.CompletedTask;
Game.Status = GameStatus.InProgress;
var playDuration = CurrentStatistics.PlayDuration;
gameTimer.OnTick += OnTimerTick;
Expand All @@ -91,6 +94,7 @@ public Task ResumeSession()
/// <returns>A task that represents the asynchronous operation of starting a new session.</returns>
public async Task StartNewSession()
{
if (Game == null) return;
Game.Status = GameStatus.InProgress;
CurrentStatistics.Reset();
gameTimer.Reset();
Expand Down
Loading