Translated from English to Dutch

This commit is contained in:
2023-05-09 16:01:19 +02:00
parent c668ca7f37
commit 759c4e2bd1
22 changed files with 49 additions and 38 deletions

View File

@@ -14,7 +14,7 @@ export const getAuth = async (event) => {
if (!token) {
throw createError({
statusCode: 401,
statusMessage: 'JWT token invalid',
statusMessage: 'JWT token is niet geldig',
})
}
@@ -28,7 +28,7 @@ export const getAuth = async (event) => {
throw createError({
statusCode: 401,
statusMessage: 'JWT token invalid',
statusMessage: 'JWT token is niet geldig',
})
}
@@ -44,7 +44,7 @@ export const getAuth = async (event) => {
throw createError({
statusCode: 500,
statusMessage: 'Error getting user'
statusMessage: 'Error tijdens ophalen van gegevens'
})
}
}

View File

@@ -2,3 +2,14 @@ export const isHexColor = (str) => {
const pattern = /^#([0-9A-F]{3}){1,2}$/i;
return pattern.test(str);
}
export const verifyUsername = (username) => {
const alphanumeric = /^[a-zA-Z0-9]+$/;
if (username.length > 20) {
return false;
}
if (!alphanumeric.test(username)) {
return false;
}
return true;
}