forked from hexbear-collective/hexbear
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
440 B
15 lines
440 B
import { knex } from '../../database/knex';
|
|
import { User } from './user.model';
|
|
import { Comment } from '../../comment/comment.model';
|
|
|
|
export interface UserMention {
|
|
id: number;
|
|
recipient_id: User['id'];
|
|
comment_id: Comment['id'];
|
|
read: boolean;
|
|
published: string;
|
|
}
|
|
|
|
export const getUserMentions = async (userId: number): Promise<UserMention[]> => {
|
|
return knex<UserMention>('user_mention').where('recipient_id', userId);
|
|
};
|