Skip to content

Commit

Permalink
small little thing
Browse files Browse the repository at this point in the history
  • Loading branch information
Ianyourgod committed Apr 5, 2024
1 parent 1c4ef6d commit 91792a9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions api/db/UMTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,14 +260,14 @@ async function tests() {
}
console.log("[ PASS ]".green, "Published/got projects");

let getProjectFile = (await manager.getProjectFile(getProjects[0].id)).toString();
let getProjectFile = (await manager.getProjectFile(getProjects[0].id));
if (getProjectFile !== "test file") {
console.log("[ FAIL ]".red, "Failed to get project file");
return false;
}
console.log("[ PASS ]".green, "Got project file");

let getProjectThumbnail = (await manager.getProjectImage(getProjects[0].id)).toString();
let getProjectThumbnail = (await manager.getProjectImage(getProjects[0].id));
if (getProjectThumbnail !== "test image") {
console.log("[ FAIL ]".red, "Failed to get project thumbnail");
return false;
Expand Down Expand Up @@ -384,11 +384,11 @@ async function tests() {
console.log("[ FAIL ]".red, "Failed to update project");
return false;
}
if ((await manager.getProjectFile(getProjects[0].id)).toString() !== "new file") {
if ((await manager.getProjectFile(getProjects[0].id)) !== "new file") {
console.log("[ FAIL ]".red, "Failed to update project file");
return false;
}
if ((await manager.getProjectImage(getProjects[0].id)).toString() !== "new image") {
if ((await manager.getProjectImage(getProjects[0].id)) !== "new image") {
console.log("[ FAIL ]".red, "Failed to update project image");
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions api/db/UserManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ class UserManager {
* @async
*/
async getProjectFile(id) {
const file = await this.readObjectFromBucket("projects", id);
const file = (await this.readObjectFromBucket("projects", id)).toString();

return file;
}
Expand All @@ -832,7 +832,7 @@ class UserManager {
* @returns {Promise<Buffer>} - The project image file.
*/
async getProjectImage(id) {
const file = await this.readObjectFromBucket("project-thumbnails", id);
const file = (await this.readObjectFromBucket("project-thumbnails", id)).toString();

return file;
}
Expand Down

0 comments on commit 91792a9

Please sign in to comment.