summaryrefslogtreecommitdiff
path: root/src/server/activitypub/note.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/activitypub/note.ts')
-rw-r--r--src/server/activitypub/note.ts28
1 files changed, 0 insertions, 28 deletions
diff --git a/src/server/activitypub/note.ts b/src/server/activitypub/note.ts
deleted file mode 100644
index 1c2e695b80..0000000000
--- a/src/server/activitypub/note.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import * as express from 'express';
-import context from '../../remote/activitypub/renderer/context';
-import render from '../../remote/activitypub/renderer/note';
-import Note from '../../models/note';
-
-const app = express.Router();
-
-app.get('/notes/:note', async (req, res, next) => {
- const accepted = req.accepts(['html', 'application/activity+json', 'application/ld+json']);
- if (!(['application/activity+json', 'application/ld+json'] as any[]).includes(accepted)) {
- return next();
- }
-
- const note = await Note.findOne({
- _id: req.params.note
- });
-
- if (note === null) {
- return res.sendStatus(404);
- }
-
- const rendered = await render(note);
- rendered['@context'] = context;
-
- res.json(rendered);
-});
-
-export default app;