Skip to content

Commit

Permalink
Update farcaster.js
Browse files Browse the repository at this point in the history
  • Loading branch information
serefyarar committed Jun 6, 2024
1 parent 74c61ac commit aab1303
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions api/src/controllers/farcaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export const createCast = async (req, res, next) => {
channelIndex = await indexService.createIndex({
title: `Farcaster - ${channelName}`,
});
await redis.hSet(`sessions`, channelIndex.id, session.serialize());
await didService.setDIDIndex(channelIndex.id, "owned");
}

await redis.hSet(
Expand All @@ -80,12 +82,10 @@ export const createCast = async (req, res, next) => {
indexId = channelIndex.id;
}

console.log(indexId);

const itemService = new ItemService(definition).setSession(session);
const item = await itemService.addItem(indexId, cast.id);

res.status(201).json({ cast, item });
console.log({ cast, item, indexId });
res.status(201).json({ cast, item, indexId });
} catch (error) {
res.status(500).json({ error: error.message, input: req.body.data });
}
Expand Down

0 comments on commit aab1303

Please sign in to comment.