aboutsummaryrefslogtreecommitdiff
path: root/vnext/server/middleware/mastodon.js
blob: e29fd736f97fdf822cff32b017d7f9163e9d42cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import { getMonthlyActiveUsers } from '../db/Users'

/**
 * Return content for embedding
 * @type {import('express').RequestParamHandler}
 */
export const instance = async (req, res) => {
    const activeUsers = await getMonthlyActiveUsers()
    res.json({
        'domain': 'juick.com',
        'title': 'Microblogging service',
        'description': 'Juick',
        'version': '2.x',
        'contact': {
            'email': 'support@juick.com'
        },
        'usage': {
            'users': {
                'active_month': activeUsers
            }    
        }
    })
}