summaryrefslogtreecommitdiff
path: root/packages/backend/src/models
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-04-01 20:47:04 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-04-01 20:47:04 -0400
commit6ac37b4d6cae064545b13fd7fdb414d0cffa178b (patch)
tree8e938baa2b15ccd233e91429d7f5ed7566ae3606 /packages/backend/src/models
parentfix typo in check_connect.js (diff)
downloadsharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.tar.gz
sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.tar.bz2
sharkey-6ac37b4d6cae064545b13fd7fdb414d0cffa178b.zip
lint and type fixes
Diffstat (limited to 'packages/backend/src/models')
-rw-r--r--packages/backend/src/models/NoteSchedule.ts4
-rw-r--r--packages/backend/src/models/UserProfile.ts2
-rw-r--r--packages/backend/src/models/json-schema/note-edit.ts59
3 files changed, 3 insertions, 62 deletions
diff --git a/packages/backend/src/models/NoteSchedule.ts b/packages/backend/src/models/NoteSchedule.ts
index dde0af6ad7..c9d031c281 100644
--- a/packages/backend/src/models/NoteSchedule.ts
+++ b/packages/backend/src/models/NoteSchedule.ts
@@ -17,7 +17,7 @@ type MinimumUser = {
uri: MiUser['uri'];
};
-export type MiScheduleNoteType={
+export type MiScheduleNoteType = {
visibility: 'public' | 'home' | 'followers' | 'specified';
visibleUsers: MinimumUser[];
channel?: MiChannel['id'];
@@ -37,7 +37,7 @@ export type MiScheduleNoteType={
apMentions?: MinimumUser[] | null;
apHashtags?: string[] | null;
apEmojis?: string[] | null;
-}
+};
@Entity('note_schedule')
export class MiNoteSchedule {
diff --git a/packages/backend/src/models/UserProfile.ts b/packages/backend/src/models/UserProfile.ts
index 449c2f370b..cda55451d0 100644
--- a/packages/backend/src/models/UserProfile.ts
+++ b/packages/backend/src/models/UserProfile.ts
@@ -4,7 +4,7 @@
*/
import { Entity, Column, Index, OneToOne, JoinColumn, PrimaryColumn } from 'typeorm';
-import { obsoleteNotificationTypes, followingVisibilities, followersVisibilities, notificationTypes, noteVisibilities, defaultCWPriorities } from '@/types.js';
+import { obsoleteNotificationTypes, followingVisibilities, followersVisibilities, notificationTypes, defaultCWPriorities } from '@/types.js';
import { id } from './util/id.js';
import { MiUser } from './User.js';
import { MiPage } from './Page.js';
diff --git a/packages/backend/src/models/json-schema/note-edit.ts b/packages/backend/src/models/json-schema/note-edit.ts
deleted file mode 100644
index ba936f866b..0000000000
--- a/packages/backend/src/models/json-schema/note-edit.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * SPDX-FileCopyrightText: marie and other Sharkey contributors
- * SPDX-License-Identifier: AGPL-3.0-only
- */
-
-export const packedNoteEdit = {
- type: "object",
- properties: {
- id: {
- type: "string",
- optional: false,
- nullable: false,
- format: "id",
- example: "xxxxxxxxxx",
- },
- updatedAt: {
- type: "string",
- optional: false,
- nullable: false,
- format: "date-time",
- },
- note: {
- type: "object",
- optional: false,
- nullable: false,
- ref: "Note",
- },
- noteId: {
- type: "string",
- optional: false,
- nullable: false,
- format: "id",
- },
- oldText: {
- type: "string",
- optional: true,
- nullable: true,
- },
- newText: {
- type: "string",
- optional: true,
- nullable: true,
- },
- cw: {
- type: "string",
- optional: true,
- nullable: true,
- },
- fileIds: {
- type: "array",
- optional: true,
- nullable: true,
- items: {
- type: "string",
- format: "id",
- },
- },
- },
-} as const;