WIP Typing fixes for compilation

This commit is contained in:
Râu Cao 2024-10-22 16:15:19 +02:00
parent be1b9f21ec
commit a0d5cba339
Signed by: raucao
GPG Key ID: 37036C356E56CC51
3 changed files with 7 additions and 7 deletions

View File

@ -129,7 +129,7 @@ export function profilePageHtml(profile: Profile, articles: Article[]): string {
return htmlLayout(title, body, profile);
}
function openWithNostrAppHtml(bech32Id): string {
function openWithNostrAppHtml(bech32Id: string): string {
let appLinksHtml = "";
const appLinks = [
{ title: "Habla", href: `https://habla.news/a/${bech32Id}` },

View File

@ -4,7 +4,7 @@ import config from "./config.ts";
const { ldap, ldapEnabled } = config;
let client;
let client: Client;
if (ldapEnabled) {
client = new Client({ url: ldap.url });
}

View File

@ -1,4 +1,4 @@
import { Application, Router, send } from "@oak/oak";
import { Application, Context, Router, send } from "@oak/oak";
import config from "./config.ts";
import naddrHandler from "./handlers/naddr.ts";
import nprofileHandler from "./handlers/nprofile.ts";
@ -10,7 +10,7 @@ import notFoundHandler from "./handlers/not-found.ts";
const router = new Router();
router.get("/:path", async (ctx: ctx) => {
router.get("/:path", async (ctx: Context) => {
const { path } = ctx.params;
if (path.startsWith("naddr")) {
@ -26,7 +26,7 @@ router.get("/:path", async (ctx: ctx) => {
}
});
router.get("/:user/:kind.atom", async (ctx: ctx) => {
router.get("/:user/:kind.atom", async (ctx: Context) => {
const { user, kind } = ctx.params;
if (
@ -39,7 +39,7 @@ router.get("/:user/:kind.atom", async (ctx: ctx) => {
}
});
router.get("/:user/:identifier", async (ctx: ctx) => {
router.get("/:user/:identifier", async (ctx: Context) => {
const { user } = ctx.params;
if (user.startsWith("@") || user.startsWith("~")) {
@ -51,7 +51,7 @@ router.get("/:user/:identifier", async (ctx: ctx) => {
router.get("/assets/:path*", async (ctx) => {
try {
const filePath = ctx.params.path;
const filePath = ctx.params.path || '';
await send(ctx, filePath, {
root: `${Deno.cwd()}/assets`,