Skip to content

Commit

Permalink
修改後端建立遊戲時回傳的Url以及修改Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
aa89227 committed Aug 20, 2023
1 parent e63c4ba commit cf4eb94
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/Backend - Build and Deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: Backend - Build and Deploy
on:
push:
branches: [main, develop, devops]
paths-ignore:
- "Client/**" #偵測目錄
- ".github/workflows/Front-End.yml" #偵測檔案"
pull_request:


Expand Down
1 change: 1 addition & 0 deletions .github/workflows/Front-End.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
branches: [main, devops, feature/Front-End-To-GitHub-Pages] #偵測分支
paths:
- "Client/**" #偵測目錄
- ".github/workflows/Front-End.yml" #偵測檔案"

jobs:
deploy-to-github-pages:
Expand Down
2 changes: 1 addition & 1 deletion Server/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
string frontendBaseUrl = app.Configuration["FrontendBaseUrl"]!.ToString();
var url = $@"{frontendBaseUrl}/games/{gameId}";
var url = $@"{frontendBaseUrl}games/{gameId}";
await context.Response.WriteAsync(url);
}).RequireAuthorization();
Expand Down
2 changes: 1 addition & 1 deletion Test/ServerTests/AcceptanceTests/CreateGameTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public async Task 建立遊戲成功()

var jwt = jwtTokenService.GenerateJwtToken(jwtBearerOptions.Audience, "idA");
string gameId = "1";
string expected = $"https://localhost:7047/{gameId}";
string expected = $"https://localhost:7047/games/{gameId}";

// Act
server.Client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", jwt);
Expand Down

0 comments on commit cf4eb94

Please sign in to comment.