Skip to content

Commit

Permalink
fix(api): fields should be snake case in API
Browse files Browse the repository at this point in the history
  • Loading branch information
alexstojda committed Aug 6, 2023
1 parent 8d786c8 commit e279a3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions web/app/src/pages/Leagues/Form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function LeagueForm(props: LeagueFormProps) {
const [slugError, setSlugError] = useState<ReactNode | undefined>(undefined)
const [leagueData, setLeagueData] = useState<LeagueCreate>({
name: "",
locationId: "",
location_id: "",
slug: "",
});

Expand Down Expand Up @@ -71,7 +71,7 @@ export default function LeagueForm(props: LeagueFormProps) {

pinmanApi.leaguesApi().leaguesPost({
...leagueData,
locationId: locationId,
location_id: locationId,
}).then(() => {
// navigate(`/leagues/${response.data.league?.slug}`)
navigate(`/leagues`)
Expand Down
2 changes: 1 addition & 1 deletion web/app/src/test/fake/league.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export function league(): League {
name: name,
slug: helpers.slugify(name),
location: location(),
ownerId: faker.datatype.uuid(),
owner_id: faker.datatype.uuid(),
created_at: faker.date.recent(5).toISOString(),
updated_at: faker.date.recent(1).toISOString()
}
Expand Down

0 comments on commit e279a3a

Please sign in to comment.