1
0
mirror of https://github.com/dap-ps/discover.git synced 2025-02-07 06:54:49 +00:00

fix re-declaring content variable (#77)

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2020-02-14 11:04:49 +01:00 committed by GitHub
parent 8ba00f884a
commit 8a2d880fba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,8 +22,8 @@ DAppsImageSchema.pre('save', async function () {
this.set({ content, hash });
});
DAppsImageSchema.statics.findByContent = async function (content) {
const content = content.split('base64,')[1];
DAppsImageSchema.statics.findByContent = async function (input) {
const content = input.split('base64,')[1];
const data = Buffer.from(content, 'base64');
const hash = await IPFSService.generateContentHash(data);