Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemathinc
GitHub Repository: sagemathinc/cocalc
Path: blob/master/src/packages/next/pages/api/v2/customize.ts
1451 views
1
/*
2
Return the entire customize object for the site, or
3
a subset of fields (to cut down on bandwidth).
4
5
This calls something that is LRU cached on the server for a few seconds.
6
*/
7
8
import getCustomize from "@cocalc/database/settings/customize";
9
import getParams from "lib/api/get-params";
10
11
export default async function handle(req, res) {
12
const { fields } = getParams(req);
13
14
try {
15
res.json(await getCustomize(fields));
16
} catch (err) {
17
res.json({ error: `${err.message}` });
18
}
19
}
20
21