Handle promise linting (#5488)

This commit is contained in:
Tom Moor
2023-06-28 20:18:18 -04:00
committed by GitHub
parent f3d8129a13
commit 89d5527d39
101 changed files with 395 additions and 343 deletions

View File

@@ -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]);

View File

@@ -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 havent signed in to {{ appName }} yet, so results may be limited`,
{