chore: remove un-used imports
This commit is contained in:
parent
3030b21f18
commit
5ec100b3bc
2 changed files with 13 additions and 6 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
import { eq, and, ne, inArray } from "drizzle-orm";
|
import { eq, and, inArray } from "drizzle-orm";
|
||||||
import { ConflictError, InternalServerError, NotFoundError } from "http-errors-enhanced";
|
import { ConflictError, InternalServerError, NotFoundError } from "http-errors-enhanced";
|
||||||
import { db } from "../../db/db";
|
import { db } from "../../db/db";
|
||||||
import {
|
import {
|
||||||
|
|
@ -28,7 +28,10 @@ const listDestinations = async () => {
|
||||||
const getDestination = async (id: number) => {
|
const getDestination = async (id: number) => {
|
||||||
const organizationId = getOrganizationId();
|
const organizationId = getOrganizationId();
|
||||||
const destination = await db.query.notificationDestinationsTable.findFirst({
|
const destination = await db.query.notificationDestinationsTable.findFirst({
|
||||||
where: and(eq(notificationDestinationsTable.id, id), eq(notificationDestinationsTable.organizationId, organizationId)),
|
where: and(
|
||||||
|
eq(notificationDestinationsTable.id, id),
|
||||||
|
eq(notificationDestinationsTable.organizationId, organizationId),
|
||||||
|
),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!destination) {
|
if (!destination) {
|
||||||
|
|
@ -194,7 +197,9 @@ const updateDestination = async (
|
||||||
const [updated] = await db
|
const [updated] = await db
|
||||||
.update(notificationDestinationsTable)
|
.update(notificationDestinationsTable)
|
||||||
.set(updateData)
|
.set(updateData)
|
||||||
.where(eq(notificationDestinationsTable.id, id))
|
.where(
|
||||||
|
and(eq(notificationDestinationsTable.id, id), eq(notificationDestinationsTable.organizationId, organizationId)),
|
||||||
|
)
|
||||||
.returning();
|
.returning();
|
||||||
|
|
||||||
if (!updated) {
|
if (!updated) {
|
||||||
|
|
@ -209,7 +214,9 @@ const deleteDestination = async (id: number) => {
|
||||||
await getDestination(id);
|
await getDestination(id);
|
||||||
await db
|
await db
|
||||||
.delete(notificationDestinationsTable)
|
.delete(notificationDestinationsTable)
|
||||||
.where(and(eq(notificationDestinationsTable.id, id), eq(notificationDestinationsTable.organizationId, organizationId)));
|
.where(
|
||||||
|
and(eq(notificationDestinationsTable.id, id), eq(notificationDestinationsTable.organizationId, organizationId)),
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const testDestination = async (id: number) => {
|
const testDestination = async (id: number) => {
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
import * as fs from "node:fs/promises";
|
import * as fs from "node:fs/promises";
|
||||||
import * as os from "node:os";
|
import * as os from "node:os";
|
||||||
import * as path from "node:path";
|
import * as path from "node:path";
|
||||||
import { and, eq, ne } from "drizzle-orm";
|
import { and, eq } from "drizzle-orm";
|
||||||
import { ConflictError, InternalServerError, NotFoundError } from "http-errors-enhanced";
|
import { InternalServerError, NotFoundError } from "http-errors-enhanced";
|
||||||
import { db } from "../../db/db";
|
import { db } from "../../db/db";
|
||||||
import { volumesTable } from "../../db/schema";
|
import { volumesTable } from "../../db/schema";
|
||||||
import { cryptoUtils } from "../../utils/crypto";
|
import { cryptoUtils } from "../../utils/crypto";
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue