Skip to content

Commit

Permalink
add prisma import
Browse files Browse the repository at this point in the history
  • Loading branch information
mimecuvalo committed Mar 3, 2023
1 parent b7147d6 commit fd976d2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions pages/api/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { User } from '@prisma/client';
import crypto from 'crypto';
import { follow } from 'social-butterfly/activitystreams';
import magic from 'magic-signatures';
import prisma from 'data/prisma';

// TODO(mime): all this user creation logic has to go somewhere else so we can reuse it later.
export default async function handler(req: NextApiRequest, res: NextApiResponse) {
Expand Down
3 changes: 3 additions & 0 deletions pages/api/social/webmention.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
if (!req.query.resource || !req.body.source || !req.body.target) {
return res.status(400).end();
}
console.log(
`Received webmention: resource: ${req.query.resource}, source: ${req.body.source}, target: ${req.body.target}`
);
const user = await getLocalUser(req.query.resource as string);
if (!user) {
return res.status(404).end();
Expand Down
1 change: 1 addition & 0 deletions pages/api/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { NextApiRequest, NextApiResponse } from 'next';

import { isRobotViewing } from 'util/crawler';
import { parseContentUrl } from 'util/url-factory';
import prisma from 'data/prisma';

const buf = new Buffer(43);
buf.write('R0lGODlhAQABAIAAAAAAAAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', 'base64');
Expand Down

1 comment on commit fd976d2

@vercel
Copy link

@vercel vercel bot commented on fd976d2 Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.