Skip to content

Commit

Permalink
Update tests and use test results to fix code
Browse files Browse the repository at this point in the history
  • Loading branch information
SiddharthMantri committed Jan 13, 2024
1 parent d52c6cf commit 0f64429
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -51,7 +51,7 @@ export function defineUpdateUserProfileDataRoute({

const userProfileData = request.body;
const imageDataUrl = userProfileData.avatar?.imageUrl;
if (imageDataUrl) {
if (imageDataUrl && typeof imageDataUrl === 'string') {
const matches = imageDataUrl.match(/^data:([A-Za-z-+\/]+);base64,(.+)$/);
if (!matches || matches.length !== 3) {
return response.customError({
Expand Down
Expand Up @@ -474,7 +474,8 @@ export default ({ getService }: FtrProviderContext): void => {
initials: 4,
// @ts-expect-error: types are not correct
color: true,
imageUrl: IMAGE_URL_TEST,
// @ts-expect-error: types are not correct
imageUrl: [],
},
headers: superUserHeaders,
});
Expand Down

0 comments on commit 0f64429

Please sign in to comment.