refactor
This commit is contained in:
@ -11,7 +11,7 @@ import { In } from 'typeorm';
|
||||
import { Emoji } from '@/models/entities/emoji';
|
||||
import { Poll } from '@/models/entities/poll';
|
||||
|
||||
export default async function renderNote(note: Note, dive = true, isTalk = false): Promise<any> {
|
||||
export default async function renderNote(note: Note, dive = true, isTalk = false): Promise<Record<string, unknown>> {
|
||||
const getPromisedFiles = async (ids: string[]) => {
|
||||
if (!ids || ids.length === 0) return [];
|
||||
const items = await DriveFiles.find({ id: In(ids) });
|
||||
|
@ -6,7 +6,14 @@
|
||||
* @param last URL of last page (optional)
|
||||
* @param orderedItems attached objects (optional)
|
||||
*/
|
||||
export default function(id: string | null, totalItems: any, first?: string, last?: string, orderedItems?: Record<string, unknown>) {
|
||||
export default function(id: string | null, totalItems: any, first?: string, last?: string, orderedItems?: Record<string, unknown>[]): {
|
||||
id: string | null;
|
||||
type: 'OrderedCollection';
|
||||
totalItems: any;
|
||||
first?: string;
|
||||
last?: string;
|
||||
orderedItems?: Record<string, unknown>[];
|
||||
} {
|
||||
const page: any = {
|
||||
id,
|
||||
type: 'OrderedCollection',
|
||||
|
Reference in New Issue
Block a user