File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import axios from 'axios'
4
4
import Snoowrap from 'snoowrap'
5
- import { PrismaClient } from '@prisma/client'
6
5
import { CommentStream } from 'snoostorm'
7
6
import { sendNotification } from './notifications'
8
7
import prisma from '@/lib/db'
@@ -203,7 +202,7 @@ export async function storePosts(posts: Array<any>) {
203
202
for ( const post of posts ) {
204
203
try {
205
204
// Check for existing record
206
- const existing = await prisma . post . findUnique ( {
205
+ const existing = await prisma . redditPost . findUnique ( {
207
206
where : { url : post . url } ,
208
207
} )
209
208
@@ -212,7 +211,7 @@ export async function storePosts(posts: Array<any>) {
212
211
continue
213
212
}
214
213
215
- const createdPost = await prisma . post . create ( { data : post } )
214
+ const createdPost = await prisma . redditPost . create ( { data : post } )
216
215
217
216
// Build notification payload
218
217
const notificationPayload = {
You can’t perform that action at this time.
0 commit comments