update
This commit is contained in:
parent
024ce3c881
commit
9f60e186b0
5 changed files with 24 additions and 81 deletions
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
|
|
@ -88,9 +88,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
super(meta, paramDef, async (ps, me) => {
|
||||
const avatarDecorations = await this.avatarDecorationService.getAll(true);
|
||||
|
||||
const filteredAvatarDecorations = avatarDecorations.filter(avatarDecoration => avatarDecoration.host === null);
|
||||
console.log(filteredAvatarDecorations);
|
||||
return filteredAvatarDecorations.map(avatarDecoration => ({
|
||||
return avatarDecorations.map(avatarDecoration => ({
|
||||
id: avatarDecoration.id,
|
||||
createdAt: this.idService.parse(avatarDecoration.id).date.toISOString(),
|
||||
updatedAt: avatarDecoration.updatedAt?.toISOString() ?? null,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-FileCopyrightText: syuilo and other misskey contributors
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
|
|
@ -70,10 +70,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
|||
const decorations = await this.avatarDecorationService.getAll(true);
|
||||
const allRoles = await this.roleService.getRoles();
|
||||
|
||||
// Filter decorations where host is null
|
||||
const filteredDecorations = decorations.filter(decoration => decoration.host === null);
|
||||
|
||||
return filteredDecorations.map(decoration => ({
|
||||
return decorations.map(decoration => ({
|
||||
id: decoration.id,
|
||||
name: decoration.name,
|
||||
description: decoration.description,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue