-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/npm_and_yarn/swiper-11.1.15
- Loading branch information
Showing
17 changed files
with
1,135 additions
and
25 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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 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,30 @@ | ||
{ | ||
"login": { | ||
"username": "Username", | ||
"password": "Password", | ||
"title": "Login", | ||
"switchText": "Don't have an account? ", | ||
"switchLink": "Sign up" | ||
}, | ||
"signup": { | ||
"username": "Username", | ||
"password": "Password", | ||
"confirmPassword": "Confirm Password", | ||
"title": "Sign up", | ||
"switchText": "Already have an account? ", | ||
"switchLink": "Login", | ||
"dataPolicy": "By checking this box I understand that the data I have entered will be stored and thus should not be sensitive information.", | ||
"dataReminder": "As a reminder, work email, phone number or real name are considered sensitive information." | ||
}, | ||
"errors": { | ||
"username": "Username is required", | ||
"password": "Password is required", | ||
"confirmPassword": "Confirm Password is required", | ||
"passwordMatch": "Passwords do not match", | ||
"usernameTaken": "Username is already taken", | ||
"notFound": "Could not find resource, backend is probably down", | ||
"unknown": "An unknown error occurred", | ||
"server": "Server error", | ||
"unauthorized": "Invalid username or password" | ||
} | ||
} |
This file contains 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,30 @@ | ||
{ | ||
"Login": { | ||
"username": "Nom d'utilisateur", | ||
"password": "Mot de passe", | ||
"title": "Connexion", | ||
"switchText": "Vous n'avez pas de compte? ", | ||
"switchLink": "Inscrivez-vous" | ||
}, | ||
"Signup": { | ||
"username": "Nom d'utilisateur", | ||
"password": "Mot de passe", | ||
"confirmPassword": "Confirmez le mot de passe", | ||
"title": "Inscrivez-vous", | ||
"switchText": "Vous avez déjà un compte? ", | ||
"switchLink": "Connexion", | ||
"dataPolicy": "En cochant cette case, je comprends que les données que j'ai saisies seront stockées et ne doivent donc pas être des informations sensibles.", | ||
"dataReminder": "Pour rappel, l'adresse e-mail professionnelle, le numéro de téléphone ou le nom réel sont considérés comme des informations sensibles." | ||
}, | ||
"Errors": { | ||
"username": "Le nom d'utilisateur est requis", | ||
"password": "Le mot de passe est requis", | ||
"confirmPassword": "La confirmation du mot de passe est requise", | ||
"passwordMatch": "Les mots de passe ne correspondent pas", | ||
"usernameTaken": "Le nom d'utilisateur est déjà pris", | ||
"notFound": "Impossible de trouver la ressource, le backend est probablement en panne", | ||
"unknown": "Une erreur inconnue s'est produite", | ||
"server": "Erreur du serveur", | ||
"unauthorized": "Nom d'utilisateur ou mot de passe invalide" | ||
} | ||
} |
This file contains 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,29 @@ | ||
import { usersApi } from "@/utils/server/backend"; | ||
|
||
export async function POST(request: Request) { | ||
|
||
const authHeader = request.headers.get("Authorization"); | ||
if (!authHeader) { | ||
return new Response( | ||
JSON.stringify({ error: "Missing Authorization header" }), | ||
{ | ||
status: 401, | ||
}, | ||
); | ||
} | ||
|
||
return usersApi.loginLoginPost({headers: { Authorization: authHeader }}).then((response) => { | ||
return Response.json(response.data); | ||
}).catch((error) => { | ||
if (error.response) { | ||
console.error("Error response:", error.response.data); | ||
} else if (error.request) { | ||
console.error("Error request:", error.request); | ||
} else { | ||
console.error("Error message:", error.message); | ||
} | ||
return new Response(JSON.stringify({ error: error.message }), { | ||
status: error.status, | ||
}); | ||
}); | ||
} |
This file contains 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,29 @@ | ||
import { usersApi } from "@/utils/server/backend"; | ||
|
||
export async function POST(request: Request) { | ||
|
||
const authHeader = request.headers.get("Authorization"); | ||
if (!authHeader) { | ||
return new Response( | ||
JSON.stringify({ error: "Missing Authorization header" }), | ||
{ | ||
status: 401, | ||
}, | ||
); | ||
} | ||
|
||
return usersApi.signupSignupPost({headers: { Authorization: authHeader }}).then((response) => { | ||
return Response.json(response.data); | ||
}).catch((error) => { | ||
if (error.response) { | ||
console.error("Error response:", error.response.data); | ||
} else if (error.request) { | ||
console.error("Error request:", error.request); | ||
} else { | ||
console.error("Error message:", error.message); | ||
} | ||
return new Response(JSON.stringify({ error: error.message }), { | ||
status: error.status, | ||
}); | ||
}); | ||
} |
This file contains 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
Oops, something went wrong.