mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(federation): ⬆️ Use @lysand-org/federation v2.0.0
This commit is contained in:
parent
47ce60494a
commit
70cd00cfa8
17 changed files with 56 additions and 60 deletions
|
|
@ -1,9 +1,7 @@
|
|||
import type { EntityValidator } from "@lysand-org/federation";
|
||||
import type { ContentFormat } from "@lysand-org/federation/types";
|
||||
import { lookup } from "mime-types";
|
||||
|
||||
export const getBestContentType = (
|
||||
content?: typeof EntityValidator.$ContentFormat,
|
||||
) => {
|
||||
export const getBestContentType = (content?: ContentFormat) => {
|
||||
if (!content) {
|
||||
return { content: "", format: "text/plain" };
|
||||
}
|
||||
|
|
@ -24,9 +22,7 @@ export const getBestContentType = (
|
|||
return { content: "", format: "text/plain" };
|
||||
};
|
||||
|
||||
export const urlToContentFormat = (
|
||||
url?: string,
|
||||
): typeof EntityValidator.$ContentFormat | null => {
|
||||
export const urlToContentFormat = (url?: string): ContentFormat | null => {
|
||||
if (!url) {
|
||||
return null;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue