-
Notifications
You must be signed in to change notification settings - Fork 2
Feat/new recaptcha #240
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
Merged
Merged
Feat/new recaptcha #240
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
cee2ac0
save
JulienChampagnol 75b7901
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol 23c9180
feat(Recaptcha): fake form a validation
JulienChampagnol 3e17eea
remove vue recaptcha
JulienChampagnol e1acbb7
Apply prepare changes
JulienChampagnol 4393f8f
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol 5a2cef0
Apply prepare changes
JulienChampagnol 54613b4
test fix oxlint onfig
JulienChampagnol 069b2a9
Merge branch 'feat/new_recaptcha' of https://github.com/Geode-solutio…
JulienChampagnol 59e8038
Apply prepare changes
JulienChampagnol 6c92bc3
oxlint
JulienChampagnol 03a6c98
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol 0f6f820
Apply prepare changes
JulienChampagnol 1328659
export
JulienChampagnol 2a3abba
Merge branch 'feat/new_recaptcha' of https://github.com/Geode-solutio…
JulienChampagnol b94b9fc
refactor
JulienChampagnol 193aa78
Merge branch 'next' of https://github.com/Geode-solutions/OpenGeodeWe…
JulienChampagnol f23ea9d
Apply prepare changes
JulienChampagnol a40f1e6
fix imports
JulienChampagnol 48dc2b4
Merge branch 'feat/new_recaptcha' of https://github.com/Geode-solutio…
JulienChampagnol File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { describe, expect, test } from "vitest" | ||
|
|
||
| import check_recaptcha_params from "@ogw_f/utils/recaptcha.js" | ||
|
|
||
| describe("recaptcha.js", () => { | ||
| const name = "" | ||
| const email = "" | ||
| const launch = false | ||
| describe("Wrong params", () => { | ||
| test("name", async () => { | ||
| const name = "test" | ||
| const result = check_recaptcha_params(name, email, launch) | ||
| expect(result.status).toBe(500) | ||
| }) | ||
| test("email", async () => { | ||
| const email = "test" | ||
| const result = check_recaptcha_params(name, email, launch) | ||
| expect(result.status).toBe(500) | ||
| }) | ||
| test("launch", async () => { | ||
| const launch = true | ||
| const result = check_recaptcha_params(name, email, launch) | ||
| expect(result.status).toBe(500) | ||
| }) | ||
| }) | ||
|
|
||
| describe("Right params", () => { | ||
| test("name", async () => { | ||
| const result = check_recaptcha_params(name, email, launch) | ||
| expect(result.status).toBe(200) | ||
| }) | ||
| }) | ||
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| function check_recaptcha_params(name, email, launch) { | ||
| if (name !== "") return { status: 500 } | ||
| if (email !== "") return { status: 500 } | ||
| if (launch !== false) return { status: 500 } | ||
| return { status: 200 } | ||
| } | ||
|
|
||
| export default check_recaptcha_params | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.