Skip to content

Commit

Permalink
fix(backend): change teamId to id to match client response expectation
Browse files Browse the repository at this point in the history
  • Loading branch information
anupcowkur committed Nov 21, 2023
1 parent ca45480 commit 23a268a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion measure-backend/measure-go/users.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (u *User) getTeams() ([]map[string]string, error) {
return nil, err
}

team["teamId"] = teamId
team["id"] = teamId
team["name"] = name
team["role"] = role
teams = append(teams, team)
Expand Down
4 changes: 2 additions & 2 deletions measure-web-app/app/auth/callback/github/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export async function GET(request: Request) {
}

type Team = {
teamId: string,
id: string,
name: string,
role: string,
}
Expand All @@ -51,5 +51,5 @@ export async function GET(request: Request) {
return NextResponse.redirect(errRedirectUrl, { status: 302 })
}

return NextResponse.redirect(`${requestUrl.origin}/${ownTeam.teamId}/overview`, { status: 302 })
return NextResponse.redirect(`${requestUrl.origin}/${ownTeam.id}/overview`, { status: 302 })
}
4 changes: 2 additions & 2 deletions measure-web-app/app/auth/callback/google/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function POST(request: Request) {
}

type Team = {
teamId: string,
id: string,
name: string,
role: string,
}
Expand All @@ -64,5 +64,5 @@ export async function POST(request: Request) {
return NextResponse.redirect(errRedirectUrl, { status: 302 })
}

return NextResponse.redirect(`${requestUrl.origin}/${ownTeam.teamId}/overview`, { status: 302 })
return NextResponse.redirect(`${requestUrl.origin}/${ownTeam.id}/overview`, { status: 302 })
}
4 changes: 2 additions & 2 deletions measure-web-app/app/auth/callback/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function GET(request: Request) {
}

type Team = {
teamId: string,
id: string,
name: string,
role: string,
}
Expand All @@ -55,5 +55,5 @@ export async function GET(request: Request) {
return NextResponse.redirect(errRedirectUrl, { status: 302 })
}

return NextResponse.redirect(`${requestUrl.origin}/${ownTeam.teamId}/overview`, { status: 302 })
return NextResponse.redirect(`${requestUrl.origin}/${ownTeam.id}/overview`, { status: 302 })
}

0 comments on commit 23a268a

Please sign in to comment.