Files
mattermost-mobile/app/queries/servers/reaction.ts
Daniel Espino García 75d1c9d228 Try to remove as many as as possible (#6200)
* Try to remove as many ` as ` as possible

* Fix imports
2022-05-12 15:46:11 +02:00

18 lines
614 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {Database, Q} from '@nozbe/watermelondb';
import {MM_TABLES} from '@constants/database';
import type ReactionModel from '@typings/database/models/servers/reaction';
const {SERVER: {REACTION}} = MM_TABLES;
export const queryReaction = (database: Database, emojiName: string, postId: string, userId: string) => {
return database.get<ReactionModel>(REACTION).query(
Q.where('emoji_name', emojiName),
Q.where('post_id', postId),
Q.where('user_id', userId),
);
};