NobGit
public anord read

Ledger

Why work hard when you can work easier?

Languages

Repository composition by tracked source files.

TypeScript
TypeScript 86% CSS 10% SQL 3% Shell 1% HTML 0%
Create file Wiki Documentation
Clone
https://nobgit.com/orgs/anord/ledger.git
ssh://[email protected]:2222/orgs/anord/ledger.git

Trace

apps/api/src/http/routes/settings.ts

Trace helps you understand code history line by line. See who changed each line, when it changed, and which commit introduced it.

settings.ts on main
Author Date Commit Line Code
Alex Nord 3 months ago 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
1
import { Router } from "express";
Open commit View diff
1 import { Router } from "express";
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
2
import { z } from "zod";
Open commit View diff
2 import { z } from "zod";
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
3
import { requireAdmin } from "../middleware/auth.js";
Open commit View diff
3 import { requireAdmin } from "../middleware/auth.js";
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
4
import { getAdminSettingsBundle, getBrandingSettings, upsertBrandingSettings } from "../../services/settings.js";
Open commit View diff
4 import { getAdminSettingsBundle, getBrandingSettings, upsertBrandingSettings } from "../../services/settings.js";
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
5
import { logAudit } from "../../services/audit.js";
Open commit View diff
5 import { logAudit } from "../../services/audit.js";
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
6
Open commit View diff
6
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
7
const brandingSchema = z.object({
Open commit View diff
7 const brandingSchema = z.object({
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
8
  siteName: z.string().min(2),
Open commit View diff
8 siteName: z.string().min(2),
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
9
  logoUrl: z.string().url().nullable(),
Open commit View diff
9 logoUrl: z.string().url().nullable(),
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
10
  brandColor: z.string().regex(/^#[0-9a-fA-F]{6}$/),
Open commit View diff
10 brandColor: z.string().regex(/^#[0-9a-fA-F]{6}$/),
Alex Nord 3 months ago b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
11
  publicKnowledgeBaseEnabled: z.boolean(),
Open commit View diff
11 publicKnowledgeBaseEnabled: z.boolean(),
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
12
  footerLinks: z.array(
Open commit View diff
12 footerLinks: z.array(
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
13
    z.object({
Open commit View diff
13 z.object({
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
14
      label: z.string().min(1),
Open commit View diff
14 label: z.string().min(1),
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
15
      href: z.string().url()
Open commit View diff
15 href: z.string().url()
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
16
    })
Open commit View diff
16 })
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
17
  ).default([])
Open commit View diff
17 ).default([])
Alex Nord 3 months ago 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
18
});
Open commit View diff
18 });
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
19
Open commit View diff
19
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
20
export const settingsRouter = Router();
Open commit View diff
20 export const settingsRouter = Router();
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
21
Open commit View diff
21
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
22
settingsRouter.get("/public", async (_req, res) => {
Open commit View diff
22 settingsRouter.get("/public", async (_req, res) => {
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
23
  const branding = await getBrandingSettings();
Open commit View diff
23 const branding = await getBrandingSettings();
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
24
  return res.json({
Open commit View diff
24 return res.json({
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
25
    branding: {
Open commit View diff
25 branding: {
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
26
      siteName: branding.site_name,
Open commit View diff
26 siteName: branding.site_name,
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
27
      logoUrl: branding.logo_url,
Open commit View diff
27 logoUrl: branding.logo_url,
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
28
      brandColor: branding.brand_color,
Open commit View diff
28 brandColor: branding.brand_color,
Alex Nord 3 months ago b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
29
      publicKnowledgeBaseEnabled: branding.public_knowledge_base_enabled,
Open commit View diff
29 publicKnowledgeBaseEnabled: branding.public_knowledge_base_enabled,
same change b71e6dd

Fixing loading issue when putting Ledger behind domain

Full commit hash
b71e6dd42f7e2cd7409b68365a17c561433e6687
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
30
      footerLinks: branding.footer_links ?? []
Open commit View diff
30 footerLinks: branding.footer_links ?? []
Alex Nord 3 months ago 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
31
    }
Open commit View diff
31 }
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
32
  });
Open commit View diff
32 });
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
33
});
Open commit View diff
33 });
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
34
Open commit View diff
34
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
35
settingsRouter.get("/admin", requireAdmin, async (_req, res) => {
Open commit View diff
35 settingsRouter.get("/admin", requireAdmin, async (_req, res) => {
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
36
  const settings = await getAdminSettingsBundle();
Open commit View diff
36 const settings = await getAdminSettingsBundle();
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
37
  return res.json(settings);
Open commit View diff
37 return res.json(settings);
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
38
});
Open commit View diff
38 });
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
39
Open commit View diff
39
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
40
settingsRouter.put("/branding", requireAdmin, async (req, res) => {
Open commit View diff
40 settingsRouter.put("/branding", requireAdmin, async (req, res) => {
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
41
  const input = brandingSchema.parse(req.body);
Open commit View diff
41 const input = brandingSchema.parse(req.body);
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
42
  const updated = await upsertBrandingSettings(input);
Open commit View diff
42 const updated = await upsertBrandingSettings(input);
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
43
  await logAudit(req.user!.id, "settings.branding.update", "branding_settings", updated.id);
Open commit View diff
43 await logAudit(req.user!.id, "settings.branding.update", "branding_settings", updated.id);
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
44
  return res.json(updated);
Open commit View diff
44 return res.json(updated);
same change 4527dbd

First commit v2

Full commit hash
4527dbdfcb1470a5c2476e2a5208f7bf48cc9d27
Author
Alex Nord <[email protected]>
Date
3 months ago
Selected line
45
});
Open commit View diff
45 });