devict / job-board

the devICT job board!
https://jobs.devict.org
0 stars 13 forks source link

feat: made requireAuth able to protect more than just job routes. #31

Closed aaronarduino closed 1 year ago

aaronarduino commented 2 years ago

I decided to rewrite how I was going about email verification and am breaking my changes up into smaller chunks. This is the first change prepping for issue #11.

What has changed?

Why? The added function allows adding another route group protected by requireAuth but have the url signature specific to that group.

If someone can think of a better way to do this, I'm all ears. 😄 I know that function definition is pretty ugly with the added callback.

kevinfalting commented 2 years ago

Hey @aaronarduino, what's the overall strategy for preventing bots from posting jobs? That extra context would help me review this PR better. 👍

aaronarduino commented 2 years ago

@kevinfalting the general idea is to send job posters a email verification link. My strategy for that is this:

aaronarduino commented 2 years ago

Ran gofmt :) didn't have that setup to run in vim.

This should be good to merge now.

sethetter commented 2 years ago

@aaronarduino I don't know if this will apply to hacktoberfest since it was opened before October :( but I gave it the label just in case!

Just needs a rebase on main then I'll get this merged! Great work :)

And thanks @kevinfalting on the thorough review!

kevinfalting commented 1 year ago

@aaronarduino hey, just wanted to check in with you here. It looks like something weird happened with the commit history? There's 3 identical-ish commits and commits showing up here that are already in main... could you sort that out before we merge this? I would expect to see a clean list of commits, each building on the rest. The holidays got the best of us I suppose 😅

aaronarduino commented 1 year ago

@kevinfalting Advent of Code and the holidays certainly got the best of me in December. And, I guess I don't have a full understanding of how git rebase works. The commit history is in a weird state after my attempts to make it more clean and to incorporate changes from main. If you have any tips to untangle the mess I'd be glad to hear them because I'm pretty close to manually grabbing the code and making a new clean PR.

sethetter commented 1 year ago

@kevinfalting @aaronarduino would a squash and merge be ok here?

kevinfalting commented 1 year ago

@sethetter, just looked this over again, merged in main, I'm going to merge it. 👍