New settings area: the webhook lives in the database and is only shown shortened afterwards, the environment variable stays as a fallback. A switch decides whether internal entries travel, a button sends the digest right away, and every run is recorded with period, count, projects, result and who triggered it.
43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
import type { Route } from 'next'
|
|
|
|
export const adminEntriesPath = '/admin/entries' as Route
|
|
export const adminNewEntryPath = '/admin/entries/new' as Route
|
|
export const lastProjectCookie = 'logbuch-last-project'
|
|
export const adminProjectsPath = '/admin/projects' as Route
|
|
export const adminNewProjectPath = '/admin/projects/new' as Route
|
|
export const adminBrandsPath = '/admin/brands' as Route
|
|
export const adminNewBrandPath = '/admin/brands/new' as Route
|
|
export const adminUsersPath = '/admin/users' as Route
|
|
export const adminClientsPath = '/admin/clients' as Route
|
|
export const adminPostTypesPath = '/admin/post-types' as Route
|
|
export const adminSettingsPath = '/admin/settings' as Route
|
|
export const adminNewPostTypePath = '/admin/post-types/new' as Route
|
|
|
|
export function adminApiFilePath(file: 'openapi' | 'style-guide' | 'skill'): Route {
|
|
return `/admin/api/files/${file}` as Route
|
|
}
|
|
|
|
export function adminProjectEntriesPath(slug: string): Route {
|
|
return `${adminEntriesPath}?project=${encodeURIComponent(slug)}` as Route
|
|
}
|
|
|
|
export function adminPostTypePath(id: string): Route {
|
|
return `/admin/post-types/${encodeURIComponent(id)}` as Route
|
|
}
|
|
|
|
export function adminEntryPath(id: string): Route {
|
|
return `/admin/entries/${encodeURIComponent(id)}` as Route
|
|
}
|
|
|
|
export function adminProjectPath(id: string): Route {
|
|
return `/admin/projects/${encodeURIComponent(id)}` as Route
|
|
}
|
|
|
|
export function adminBrandPath(id: string): Route {
|
|
return `/admin/brands/${encodeURIComponent(id)}` as Route
|
|
}
|
|
|
|
export function adminUserPath(id: string): Route {
|
|
return `/admin/users/${encodeURIComponent(id)}` as Route
|
|
}
|