add websocket server to this dir. fix stuff for client
This commit is contained in:
@ -2,7 +2,8 @@ import 'server-only';
|
||||
import { db } from '~/server/db';
|
||||
import * as schema from '~/server/db/schema';
|
||||
import { eq, and, or, like, not, desc, sql } from 'drizzle-orm';
|
||||
import { User,
|
||||
import type {
|
||||
User,
|
||||
Relationship,
|
||||
UserRelationship,
|
||||
RelationshipData,
|
||||
@ -279,6 +280,8 @@ export const updateRelationshipStatus = async (
|
||||
} else if (status === 'rejected') {
|
||||
await db.delete(schema.userRelationships)
|
||||
.where(eq(schema.userRelationships.relationshipId, relationship.id));
|
||||
await db.delete(schema.countdowns)
|
||||
.where(eq(schema.countdowns.relationshipId, relationship.id));
|
||||
await db.delete(schema.relationships)
|
||||
.where(eq(schema.relationships.id, relationship.id));
|
||||
return null;
|
||||
|
Reference in New Issue
Block a user