Hi,
thanks for the fast reply, but the master key is already being used
Moralis.Cloud.define("getArtistByURL", async (request) => {
const query = new Moralis.Query("Artist");
query.equalTo("slug", request.params.slug);
query.equalTo("is_active", true);
query.select(
"objectId",
"name",
"slug",
"dates",
"bio",
"avatar",
"banner",
"is_active",
);
const result = await query.first({useMasterKey:true});
if(!result) return;
return {
id: result.id,
name: result.attributes.name,
slug: result.attributes.slug,
dates: result.attributes.dates ? result.attributes.dates : null,
bio: result.attributes.bio ? result.attributes.bio : null,
avatar: result.attributes.avatar ? result.attributes.avatar.url() : null,
banner: result.attributes.banner ? result.attributes.banner.url() : null
}
});
Regards