Create members.json api #489
No reviewers
Labels
No Label
a11y
Backlog
Blocked
Bug
Content
Dependencies
Design
Feature Request
Good First Issue
In Progress
Performance
Priority - High
Priority - Low
Priority - Medium
Untriaged
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: www/www-new#489
Loading…
Reference in New Issue
No description provided.
Delete Branch "adi-member-json-api"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I changed some other code along the way ... which makes this PR slightly long :') rip.
closes #472
takes a stab at #466
https://csclub.uwaterloo.ca/~a3thakra/csc/adi-member-json-api/api/members.json
e0528681c1
to6eb8d4d064
Looks good overall, thanks for working on this Adi! Though next time please split unrelated changes into separate PRs. 😆
@ -0,0 +1,25 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
Dropping this here for personal reference: https://json-schema.org/
@ -0,0 +1,25 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"title": "Member list",
"description": "List of all members of the Computer Science Club of the University of Waterloo",
NIT: List of all current members
fixed!
@ -0,0 +13,4 @@
members,
};
await writeFile("public/api/members.json", JSON.stringify(result));
Just wanted to note, I think NextJS has some kind of API Routing thing which maps files in
pages/api
to/api/*
- I wonder how that would interact with us hosting a static file like this at/api/*
?(This probably isn't relevant though, as we are aiming to keep the site static so there's no reason to be using the API Routing shenanigans.)
https://nextjs.org/docs/api-routes/introduction
yep, that one is only for a non-static website.
I think it's okay for now, even if we add nextjs api later on, it should still work.
@ -23,0 +18,4 @@
/*
Note:
This script will not work for events by default anymore, since events now have startDate instead of endDate
NIT: is this the best location in the file for this comment? Not sure if it should go right at the top, or right above the main function, or if this is fine. 🤔
Since the script doesn't work, i decided to delete it. I don't think we'll be needing this. Even if we do it's fairly easy to rewrite :P
@ -24,0 +32,4 @@
skipCurrent?: boolean;
}
export function* getTermYear(
This is very cool, did not know it was a thing 👀
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/function*
whoopsie got a little carried away :'(