Add email field to /api/v1/instance

This commit is contained in:
Alex Gleason 2023-04-30 23:27:29 -05:00
parent 0a12bbb42f
commit 8b3eab80b3
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
export const LOCAL_DOMAIN = Deno.env.get('LOCAL_DOMAIN') || 'http://localhost:8000'; export const LOCAL_DOMAIN = Deno.env.get('LOCAL_DOMAIN') || 'http://localhost:8000';
export const POST_CHAR_LIMIT = Number(Deno.env.get('POST_CHAR_LIMIT') || 5000); export const POST_CHAR_LIMIT = Number(Deno.env.get('POST_CHAR_LIMIT') || 5000);
export const ADMIN_EMAIL = Deno.env.get('ADMIN_EMAIL') || 'webmaster@localhost';
export const poolRelays = (Deno.env.get('RELAY_POOL') || '').split(',').filter(Boolean); export const poolRelays = (Deno.env.get('RELAY_POOL') || '').split(',').filter(Boolean);
export const publishRelays = ['wss://relay.mostr.pub']; export const publishRelays = ['wss://relay.mostr.pub'];

View File

@ -1,4 +1,4 @@
import { LOCAL_DOMAIN, POST_CHAR_LIMIT } from '@/config.ts'; import { ADMIN_EMAIL, LOCAL_DOMAIN, POST_CHAR_LIMIT } from '@/config.ts';
import type { Context } from '@/deps.ts'; import type { Context } from '@/deps.ts';
@ -38,6 +38,7 @@ function instanceController(c: Context) {
streaming_api: `wss://${host}`, streaming_api: `wss://${host}`,
}, },
version: '0.0.0 (compatible; Ditto 0.0.1)', version: '0.0.0 (compatible; Ditto 0.0.1)',
email: ADMIN_EMAIL,
rules: [], rules: [],
}); });
} }