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

Connect team issue list to API #21

Merged
merged 9 commits into from
Oct 3, 2024

Conversation

bherbst
Copy link
Collaborator

@bherbst bherbst commented Sep 27, 2024

Wires up the team issue list to actual API data instead of mock data.

I tested locally by POSTing some notes manually - UI support for adding notes will be up next.

To properly support this I set up some groundwork for managing the current configured season & event code. It's functional-ish, but at some point it would be great if it worked a bit more automatically (see #20 )

image

@bherbst bherbst requested a review from 333fred September 27, 2024 18:37
resolutionStatus?: string;
}
export async function getTeamNotes(
fetch: any,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is fetch?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So that's a great question and I'm really not familiar enough with Svelte and JS to talk particularly eloquently about it, but at a high level Svelte defines its own fetch that provides some additional functionality on top of the native fetch API. To use that with openapi-fetch, we need to pass it along from the Svelte load() function.

That pattern is the recommendation from openapi-fetch:
https://openapi-ts.dev/openapi-fetch/examples#svelte-sveltekit

I am not using it in some places where we aren't using a Svelte load() function, mostly because I also just don't know how to get access to Svelte's fetch in those cases.

It is something I want to dig into a bit more too, if only for my own learning

@bherbst
Copy link
Collaborator Author

bherbst commented Sep 30, 2024

I'm going to come back to this later this week after merging #22

@bherbst bherbst requested a review from 333fred October 1, 2024 23:46
@bherbst
Copy link
Collaborator Author

bherbst commented Oct 1, 2024

@333fred updated with latest swagger spec. Much easier to work with!

@bherbst bherbst merged commit c734008 into FIRST-Robotics-Competition:dev Oct 3, 2024
1 check passed
@bherbst bherbst deleted the team_issue_api branch October 3, 2024 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants