Skip to content

Commit

Permalink
feat(ipns): revise refreshIPNSFeed mutation
Browse files Browse the repository at this point in the history
  • Loading branch information
gitwoz committed Nov 6, 2024
1 parent ec8dfde commit 84386e9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/mutations/user/refreshIPNSFeed.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import type { GQLMutationResolvers } from 'definitions'

import { QUEUE_URL } from 'common/enums'
import { aws } from 'connectors'

const resolver: GQLMutationResolvers['refreshIPNSFeed'] = async (
_,
{ input: { userName, numArticles = 50 } },
{
dataSources: {
userService,
queues: { publicationQueue },
},
}
{ dataSources: { userService } }
) => {
const ipnsKeyRec = await userService.findOrCreateIPNSKey(userName)

if (ipnsKeyRec) {
// TODO
aws.sqsSendMessage({

Check warning on line 14 in src/mutations/user/refreshIPNSFeed.ts

View check run for this annotation

Codecov / codecov/patch

src/mutations/user/refreshIPNSFeed.ts#L14

Added line #L14 was not covered by tests
messageBody: { userName, useMattersIPNS: true },
queueUrl: QUEUE_URL.ipnsUserPublication,
})
}

return userService.findByUserName(userName)
Expand Down

0 comments on commit 84386e9

Please sign in to comment.