WIP Resolve username via npub, LDAP
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ctx } from "@oak/oak";
|
||||
import { Context } from "@oak/oak";
|
||||
import { nip19 } from "@nostr/tools";
|
||||
import { log } from "../log.ts";
|
||||
import { articleHtml } from "../html.ts"
|
||||
@@ -7,12 +7,12 @@ import {
|
||||
fetchProfileEvent
|
||||
} from "../nostr.ts";
|
||||
|
||||
const naddrHandler = async function (ctx: ctx) {
|
||||
const naddrHandler = async function (ctx: Context) {
|
||||
const { request } = ctx;
|
||||
const { path } = ctx.params;
|
||||
const naddr = ctx.params.path;
|
||||
|
||||
try {
|
||||
const r = nip19.decode(path);
|
||||
const r = nip19.decode(naddr);
|
||||
const articleEvent = await fetchReplaceableEvent(r.data.pubkey, r.data.identifier);
|
||||
const profileEvent = await fetchProfileEvent(r.data.pubkey);
|
||||
let profile;
|
||||
|
||||
Reference in New Issue
Block a user