Translated from English to Dutch
This commit is contained in:
@@ -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'
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user