mirror of
https://iceshrimp.dev/crimekillz/iceshrimp-161sh.git
synced 2024-11-23 12:39:59 +01:00
wip
This commit is contained in:
parent
2dad0c8d6b
commit
cf3216223d
@ -1,11 +1,12 @@
|
||||
import * as express from 'express';
|
||||
|
||||
import config from '../config';
|
||||
import parseAcct from '../acct/parse';
|
||||
import User from '../models/user';
|
||||
const express = require('express');
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get('/.well-known/webfinger', async (req, res) => {
|
||||
app.get('/.well-known/webfinger', async (req: express.Request, res: express.Response) => {
|
||||
if (typeof req.query.resource !== 'string') {
|
||||
return res.sendStatus(400);
|
||||
}
|
||||
@ -34,13 +35,15 @@ app.get('/.well-known/webfinger', async (req, res) => {
|
||||
|
||||
return res.json({
|
||||
subject: `acct:${user.username}@${config.host}`,
|
||||
links: [
|
||||
{
|
||||
links: [{
|
||||
rel: 'self',
|
||||
type: 'application/activity+json',
|
||||
href: `${config.url}/@${user.username}`
|
||||
}
|
||||
]
|
||||
}, {
|
||||
rel: 'http://webfinger.net/rel/profile-page',
|
||||
type: 'text/html',
|
||||
href: `${config.url}/@${user.username}`
|
||||
}]
|
||||
});
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user