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 3, 2024
1 parent ff3deac commit 8e72251
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions api/src/controllers/farcaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export const createCast = async (req, res, next) => {
//todo get fragment
try {
const session = await DIDSession.fromSession(process.env.FARCASTER_SESSION);
const didSession = await session.did.authenticate();
await session.did.authenticate();

const composeDBService = new ComposeDBService(
definition,
castFragment,
).setSession(didSession);
).setSession(session);

const cast = await composeDBService.createNode({
...req.body.data,
Expand All @@ -28,7 +28,7 @@ export const createCast = async (req, res, next) => {
const indexId = `kjzl6kcym7w8y97yfoer7bb20k4j3x3jb64t6nk714879q9cqyr3s8kuhpg9b84`;
const indexService = new IndexService(definition);
const index = await indexService.getIndexById(indexId);
const pkpSession = await getPKPSession(didSession, index);
const pkpSession = await getPKPSession(session, index);

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

0 comments on commit 8e72251

Please sign in to comment.