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

Release 0.2.5 #28

Merged
merged 53 commits into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
6f853df
Clear battletag TextField when adding collaborator
LinusPhoenix Feb 17, 2022
144cb25
Make renaming team owner-only, trim raid team name on creation
LinusPhoenix Feb 17, 2022
44b5313
backend returns 404 when requesting non-existing raid team
LinusPhoenix Feb 17, 2022
68330f1
Make battletags case insensitive when sharing raid teams
LinusPhoenix Feb 17, 2022
1235ce7
Show not found page when raid team returns 404
LinusPhoenix Feb 17, 2022
0bc1a86
Prepare release 0.2.1
LinusPhoenix Feb 17, 2022
43dfe5e
Move todos to github issues
LinusPhoenix Feb 17, 2022
5581386
bugfix: api requests were being fired twice
karifrederiksen Feb 17, 2022
3fff100
#20 Fix footer design
karifrederiksen Feb 17, 2022
d236c6b
#10 Add email address in footer
LinusPhoenix Feb 17, 2022
65c4f1b
make footer responsive
karifrederiksen Feb 17, 2022
8977970
#16 Use flags to indicate regions
karifrederiksen Feb 17, 2022
562b11c
Merge branch 'develop' of https://github.com/LinusPhoenix/wow-raid-ma…
karifrederiksen Feb 17, 2022
a4b3332
#16 Add team owner to the raid teams grid
karifrederiksen Feb 17, 2022
7fd53ba
#16 Add column for UserRole to teams table
karifrederiksen Feb 17, 2022
29ac5d4
Add logging for cache invalidations
karifrederiksen Feb 17, 2022
e303a08
#7 Add unit tests for search and users module
LinusPhoenix Feb 17, 2022
5adadeb
Include raid team owner in all cases
LinusPhoenix Feb 17, 2022
1608672
Use flag images for regions
LinusPhoenix Feb 17, 2022
b119bd6
Add melee dps as a valid role for shamans
LinusPhoenix Feb 21, 2022
c34bc49
Prepare release 0.2.2
LinusPhoenix Feb 21, 2022
ec440f2
Merge branch 'main' into develop
LinusPhoenix Feb 21, 2022
342e03c
Add 404 doges
LinusPhoenix Feb 21, 2022
b98ffc0
Let hunters be melee
LinusPhoenix Feb 22, 2022
54d92a8
Prepare release 0.2.3
LinusPhoenix Feb 23, 2022
4963fec
Merge branch 'main' into develop
LinusPhoenix Feb 23, 2022
e89aa86
apply lint fixes
karifrederiksen Feb 26, 2022
4a04dc6
explicitly set linter and code formatter
karifrederiksen Feb 26, 2022
3a81015
add test for usePromise hook
karifrederiksen Feb 26, 2022
093dae9
Merge branch 'develop' of https://github.com/LinusPhoenix/wow-raid-ma…
karifrederiksen Feb 26, 2022
5bdcc9c
make test more correct
karifrederiksen Feb 26, 2022
5aa947f
Update ilvl colors for sepulcher of the first ones
LinusPhoenix Mar 1, 2022
10eff37
Prepare release 0.2.4
LinusPhoenix Mar 2, 2022
3e4a3a6
Merge branch 'main' into develop
LinusPhoenix Mar 2, 2022
0da513c
URL encode character name for raider.io search
LinusPhoenix Mar 3, 2022
5db655b
Account for null expansions and instances arrays in lockout data
LinusPhoenix Mar 3, 2022
d70f028
#25 add a throwing version of serverRequest
karifrederiksen Mar 3, 2022
ee55592
#14 Improve raider dialog
karifrederiksen Mar 3, 2022
de20b50
#14 make text more descriptive
karifrederiksen Mar 3, 2022
306cfd5
#14 Add Raider - Change role automatically when current role is inapp…
karifrederiksen Mar 3, 2022
e094e38
priests are not melee
karifrederiksen Mar 3, 2022
55684ef
Replace use of deprecated toPromise() with lastValueFrom()
LinusPhoenix Mar 4, 2022
ef07a04
create a global context for UserInfo
karifrederiksen Mar 7, 2022
5ac0b74
Merge branch 'develop' of https://github.com/LinusPhoenix/wow-raid-ma…
karifrederiksen Mar 7, 2022
f580910
#25 Add error boundaries
karifrederiksen Mar 9, 2022
7ebf0c3
update the package lock
karifrederiksen Mar 10, 2022
2693df1
more stylish title
karifrederiksen Mar 10, 2022
af2efc8
Add-Raider dialog: Shuffle the inputs around so you start by inputtin…
karifrederiksen Mar 10, 2022
223a134
#12 upgrade some dependencies
karifrederiksen Mar 11, 2022
0cc4af3
#13 enable eslint and fix warnings
karifrederiksen Mar 11, 2022
9c508f4
#14 focus the character name field after adding
karifrederiksen Mar 11, 2022
c9b0907
#22 disable animation for armor chart
karifrederiksen Mar 11, 2022
725e295
Add WIP component, display it on Raider page
LinusPhoenix May 10, 2022
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
10 changes: 10 additions & 0 deletions backend/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// linting
"dbaeumer.vscode-eslint",
// formatting
"rvest.vs-code-prettier-eslint",
]
}
10 changes: 8 additions & 2 deletions backend/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
"typescript.tsdk": "node_modules\\typescript\\lib",
"[typescript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
},
"[typescriptreact]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
},
"editor.formatOnSave": true,
}
5 changes: 3 additions & 2 deletions backend/package-lock.json

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

2 changes: 1 addition & 1 deletion backend/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backend",
"version": "0.2.3",
"version": "0.2.4",
"description": "",
"author": "",
"private": true,
Expand Down
14 changes: 9 additions & 5 deletions backend/src/auth/bnet-oauth2.strategy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { HttpService } from "@nestjs/axios";
import { HttpException, Injectable, Logger } from "@nestjs/common";
import { PassportStrategy } from "@nestjs/passport";
import { Strategy } from "passport-oauth2";
import { lastValueFrom } from "rxjs";
import { User } from "src/entities/user.entity";
import { UsersService } from "src/users/users.service";

Expand All @@ -27,13 +28,13 @@ export class BNetOauth2Strategy extends PassportStrategy(Strategy, "bnet") {
// To be able to read the data contained in the access token (user id, battletag),
// we need to call their /oauth/userinfo endpoint.
this.logger.log("Received access token from battlenet oauth. Getting user info.");
const res = await this.httpService
.get("https://eu.battle.net/oauth/userinfo", {
const res = await lastValueFrom(
this.httpService.get("https://eu.battle.net/oauth/userinfo", {
headers: {
Authorization: `Bearer ${accessToken}`,
},
})
.toPromise();
}),
);

const userInfo = res.data as { id: number; battletag: string };
// If the token had an issue, we might get a response with a 200 status code
Expand All @@ -45,7 +46,10 @@ export class BNetOauth2Strategy extends PassportStrategy(Strategy, "bnet") {
500,
);
}
this.logger.log("Successfully received user info from battlenet:\n" + JSON.stringify(userInfo, null, 4));
this.logger.log(
"Successfully received user info from battlenet:\n" +
JSON.stringify(userInfo, null, 4),
);

return await this.usersService.findOrCreate(userInfo);
} catch (exception) {
Expand Down
2 changes: 2 additions & 0 deletions backend/src/commons/validation-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export class ValidationHelper {
RaiderRole.Melee,
RaiderRole.Ranged,
];
private static readonly HEALER_RANGED: RaiderRole[] = [RaiderRole.Healer, RaiderRole.Ranged];
private static readonly TANK_MELEE: RaiderRole[] = [RaiderRole.Tank, RaiderRole.Melee];
private static readonly MELEE_RANGED: RaiderRole[] = [RaiderRole.Melee, RaiderRole.Ranged];

Expand All @@ -27,6 +28,7 @@ export class ValidationHelper {
case "Demon Hunter":
return this.TANK_MELEE.includes(role);
case "Priest":
return this.HEALER_RANGED.includes(role);
case "Shaman":
return this.HEALER_MELEE_RANGED.includes(role);
case "Rogue":
Expand Down
4 changes: 2 additions & 2 deletions backend/src/raiders/utils/raid-lockout-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export class RaidLockoutHelper {
characterRaids: CharacterRaids,
currentRaidTier: RaidTierConfiguration,
): RaidLockout {
const currentExpansion = characterRaids.expansions.find(
const currentExpansion = characterRaids.expansions?.find(
(expansion) => expansion.expansion.id === currentRaidTier.expansionId,
);
if (!currentExpansion) {
return undefined;
}

const currentRaidTierLockout = currentExpansion.instances.find(
const currentRaidTierLockout = currentExpansion.instances?.find(
(instance) => instance.instance.id === currentRaidTier.raidTierId,
);
if (!currentRaidTierLockout) {
Expand Down
2 changes: 1 addition & 1 deletion backend/src/search/search.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class SearchService {
constructor(private httpService: HttpService) {}

async search(region: RegionName, characterName: string): Promise<SearchResultDto[]> {
const endpoint = `https://raider.io/api/search?term=${characterName}`;
const endpoint = `https://raider.io/api/search?term=${encodeURIComponent(characterName)}`;

const searchResults = (await (
await lastValueFrom(this.httpService.get(endpoint))
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.8"

services:
caddy:
image: raidsimp-frontend:0.2.3
image: raidsimp-frontend:0.2.4
restart: always
ports:
- "80:80"
Expand All @@ -16,7 +16,7 @@ services:
max-file: "10"

backend:
image: raidsimp-backend:0.2.3
image: raidsimp-backend:0.2.4
restart: always
ports:
- "127.0.0.1:3000:3000"
Expand Down
2 changes: 1 addition & 1 deletion frontend/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
PORT=3001
REACT_APP_BASE_URL=http://localhost:3000
DISABLE_ESLINT_PLUGIN=true
DISABLE_ESLINT_PLUGIN=false
SKIP_PREFLIGHT_CHECK=true
10 changes: 10 additions & 0 deletions frontend/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
// linting
"dbaeumer.vscode-eslint",
// formatting
"rvest.vs-code-prettier-eslint",
]
}
9 changes: 8 additions & 1 deletion frontend/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"typescript.tsdk": "node_modules\\typescript\\lib"
"typescript.tsdk": "node_modules\\typescript\\lib",
"[typescript]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
},
"[typescriptreact]": {
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint",
},
"editor.formatOnSave": true,
}
Loading