fetch patrons remotely
This commit is contained in:
parent
652908c686
commit
bef01175dc
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "calckey",
|
"name": "calckey",
|
||||||
"version": "12.119.0-calc.15.3",
|
"version": "12.119.0-calc.15.4",
|
||||||
"codename": "aqua",
|
"codename": "aqua",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
@ -275,6 +275,7 @@ import * as ep___pinnedUsers from './endpoints/pinned-users.js';
|
|||||||
import * as ep___customMOTD from './endpoints/custom-motd.js';
|
import * as ep___customMOTD from './endpoints/custom-motd.js';
|
||||||
import * as ep___customSplashIcons from './endpoints/custom-splash-icons.js';
|
import * as ep___customSplashIcons from './endpoints/custom-splash-icons.js';
|
||||||
import * as ep___latestVersion from './endpoints/latest-version.js';
|
import * as ep___latestVersion from './endpoints/latest-version.js';
|
||||||
|
import * as ep___patrons from './endpoints/patrons.js';
|
||||||
import * as ep___promo_read from './endpoints/promo/read.js';
|
import * as ep___promo_read from './endpoints/promo/read.js';
|
||||||
import * as ep___requestResetPassword from './endpoints/request-reset-password.js';
|
import * as ep___requestResetPassword from './endpoints/request-reset-password.js';
|
||||||
import * as ep___resetDb from './endpoints/reset-db.js';
|
import * as ep___resetDb from './endpoints/reset-db.js';
|
||||||
@ -599,6 +600,7 @@ const eps = [
|
|||||||
['custom-motd', ep___customMOTD],
|
['custom-motd', ep___customMOTD],
|
||||||
['custom-splash-icons', ep___customSplashIcons],
|
['custom-splash-icons', ep___customSplashIcons],
|
||||||
['latest-version', ep___latestVersion],
|
['latest-version', ep___latestVersion],
|
||||||
|
['patrons', ep___patrons],
|
||||||
['promo/read', ep___promo_read],
|
['promo/read', ep___promo_read],
|
||||||
['request-reset-password', ep___requestResetPassword],
|
['request-reset-password', ep___requestResetPassword],
|
||||||
['reset-db', ep___resetDb],
|
['reset-db', ep___resetDb],
|
||||||
|
28
packages/backend/src/server/api/endpoints/patrons.ts
Normal file
28
packages/backend/src/server/api/endpoints/patrons.ts
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
import define from '../define.js';
|
||||||
|
|
||||||
|
export const meta = {
|
||||||
|
tags: ['meta'],
|
||||||
|
|
||||||
|
requireCredential: false,
|
||||||
|
requireCredentialPrivateMode: false,
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export const paramDef = {
|
||||||
|
type: 'object',
|
||||||
|
properties: {},
|
||||||
|
required: [],
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
// eslint-disable-next-line import/no-default-export
|
||||||
|
export default define(meta, paramDef, async () => {
|
||||||
|
let patrons;
|
||||||
|
await fetch('https://codeberg.org/thatonecalculator/calckey/raw/branch/develop/patrons.json')
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) => {
|
||||||
|
patrons = data[0];
|
||||||
|
});
|
||||||
|
|
||||||
|
return {
|
||||||
|
patrons,
|
||||||
|
};
|
||||||
|
});
|
@ -69,11 +69,7 @@ import { defaultStore } from '@/store';
|
|||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { definePageMetadata } from '@/scripts/page-metadata';
|
import { definePageMetadata } from '@/scripts/page-metadata';
|
||||||
|
|
||||||
const patrons = [
|
const patrons = await os.api('patrons');
|
||||||
'@atomicpoet@vancity.social',
|
|
||||||
'@shoq@newsroom.social',
|
|
||||||
'@pikadude@erisly.social',
|
|
||||||
];
|
|
||||||
|
|
||||||
let easterEggReady = false;
|
let easterEggReady = false;
|
||||||
let easterEggEmojis = $ref([]);
|
let easterEggEmojis = $ref([]);
|
||||||
|
7
patrons.json
Normal file
7
patrons.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[{
|
||||||
|
[
|
||||||
|
"@atomicpoet@vancity.social"
|
||||||
|
"@shoq@newsroom.social"
|
||||||
|
"@pikadude@erisly.social"
|
||||||
|
]
|
||||||
|
}]
|
Loading…
Reference in New Issue
Block a user