mirror of
https://github.com/versia-pub/server.git
synced 2026-04-27 20:59:15 +02:00
refactor: ♻️ Always use explicit types in every function
This commit is contained in:
parent
54cea29ce9
commit
c1dcdc78ae
62 changed files with 359 additions and 226 deletions
|
|
@ -2,7 +2,12 @@ import type { ContentFormat } from "@versia/federation/types";
|
|||
import { lookup } from "mime-types";
|
||||
import { config } from "~/packages/config-manager";
|
||||
|
||||
export const getBestContentType = (content?: ContentFormat | null) => {
|
||||
export const getBestContentType = (
|
||||
content?: ContentFormat | null,
|
||||
): {
|
||||
content: string;
|
||||
format: string;
|
||||
} => {
|
||||
if (!content) {
|
||||
return { content: "", format: "text/plain" };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue