-
Notifications
You must be signed in to change notification settings - Fork 1
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
Refactoring - Remove unused endpoints and use Apollo Client 2.0 #45
Conversation
Hey y'all! A deployment of this PR can be found here: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally got around to this. Overall looks 👍
client/js/main.ts
Outdated
button.disabled = false; | ||
}); | ||
} | ||
|
||
function attachUserDeleteHandlers () { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this admin account deletion functionality being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I think I just did this by accident while moving things around. Thanks for pointing this out!
client/js/main.ts
Outdated
// Escape possible HTML in username | ||
if (by === null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason to do this instead of an optional argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally did this because the type of checked_in_by
in the GraphQL Tag object is string | null
. But GraphQL queries should always return a string for checked_in_by
(see https://github.com/HackGT/checkin2/blob/master/server/graphql.ts#L129), so I just went ahead and made this a non-null type.
client/js/main.ts
Outdated
|
||
// Get checked question options | ||
let checked: string[] = []; | ||
let checked = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This list will be implicitly typed as any
if you remove this annotation
@@ -645,44 +515,8 @@ document.getElementById("confirmation-branches-filter")!.addEventListener("chang | |||
loadAttendees(); | |||
}); | |||
|
|||
attachUserDeleteHandlers(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above comment about user management
server/app.ts
Outdated
fs.createReadStream(request.file.path).pipe(parser); | ||
}); | ||
|
||
apiRouter.route("/data/export").get(authenticateWithReject, async (request, response) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is CSV data export something worth keeping around? Related to #48
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this is a good point. Let's keep CSV export, but I do think we should get around to #48 at some point, since the CSV export exports data in checkin's mongo collection, which is only a subset of all the data that checkin GraphQL can provide.
@petschekr thanks for taking a look! Made some changes based on your comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me with those changes. This includes a lot of breaking changes so we should increment the version to 2.0.0 when you're ready to merge.
Changes:
test
folder, so that the tests get compiled to JS.