merge branch 'main' of github.com:lite-note/lite-note
This commit is contained in:
Julien Calixte
2026-02-10 20:48:45 +01:00
5 changed files with 75 additions and 57 deletions

View File

@@ -0,0 +1,13 @@
export const getAka = async (dids: Set<string>) => {
const correspondance = await Promise.all(
[...dids].map(async (did) => {
const response = await fetch(`https://plc.directory/${did}`)
const {
alsoKnownAs: [aka],
} = await response.json()
return [did, aka] as [string, string]
}),
)
return new Map(correspondance)
}

View File

@@ -1,7 +1,19 @@
import { DataType } from '@/data/DataType.enum'
import { Model } from '@/data/models/Model'
import { DataType } from "@/data/DataType.enum"
import { Model } from "@/data/models/Model"
export interface Note extends Model<DataType.Note> {
content: string
editedSha?: string
}
export interface PublicNoteListItem {
did: string
rkey: string
title: string
publishedAt: string
createdAt: string
}
export interface PublicNote extends PublicNoteListItem {
content: string
}