Handle promise linting (#5488)
This commit is contained in:
@@ -30,10 +30,10 @@ function Slack() {
|
||||
const error = query.get("error");
|
||||
|
||||
React.useEffect(() => {
|
||||
collections.fetchPage({
|
||||
void collections.fetchPage({
|
||||
limit: 100,
|
||||
});
|
||||
integrations.fetchPage({
|
||||
void integrations.fetchPage({
|
||||
limit: 100,
|
||||
});
|
||||
}, [collections, integrations]);
|
||||
|
||||
@@ -153,6 +153,7 @@ router.post("hooks.slack", async (ctx: APIContext) => {
|
||||
verifySlackToken(token);
|
||||
|
||||
let user, team;
|
||||
|
||||
// attempt to find the corresponding team for this request based on the team_id
|
||||
team = await Team.findOne({
|
||||
include: [
|
||||
@@ -299,13 +300,17 @@ router.post("hooks.slack", async (ctx: APIContext) => {
|
||||
const { results, totalCount } = user
|
||||
? await SearchHelper.searchForUser(user, text, options)
|
||||
: await SearchHelper.searchForTeam(team, text, options);
|
||||
SearchQuery.create({
|
||||
|
||||
void SearchQuery.create({
|
||||
userId: user ? user.id : null,
|
||||
teamId: team.id,
|
||||
source: "slack",
|
||||
query: text,
|
||||
results: totalCount,
|
||||
}).catch((err) => {
|
||||
Logger.error("Failed to create search query", err);
|
||||
});
|
||||
|
||||
const haventSignedIn = t(
|
||||
`It looks like you haven’t signed in to {{ appName }} yet, so results may be limited`,
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user