chore: Rename Authentication -> IntegrationAuthentication (#2091)
This commit is contained in:
@@ -5,13 +5,13 @@ import { AuthenticationError, InvalidRequestError } from "../errors";
|
||||
import {
|
||||
UserAuthentication,
|
||||
AuthenticationProvider,
|
||||
Authentication,
|
||||
Document,
|
||||
User,
|
||||
Team,
|
||||
Collection,
|
||||
SearchQuery,
|
||||
Integration,
|
||||
IntegrationAuthentication,
|
||||
} from "../models";
|
||||
import { presentSlackAttachment } from "../presenters";
|
||||
import * as Slack from "../slack";
|
||||
@@ -38,7 +38,7 @@ router.post("hooks.unfurl", async (ctx) => {
|
||||
});
|
||||
if (!user) return;
|
||||
|
||||
const auth = await Authentication.findOne({
|
||||
const auth = await IntegrationAuthentication.findOne({
|
||||
where: { service: "slack", teamId: user.teamId },
|
||||
});
|
||||
if (!auth) return;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable flowtype/require-valid-file-annotation */
|
||||
import TestServer from "fetch-test-server";
|
||||
import app from "../app";
|
||||
import { Authentication, SearchQuery } from "../models";
|
||||
import { IntegrationAuthentication, SearchQuery } from "../models";
|
||||
import * as Slack from "../slack";
|
||||
import { buildDocument, buildIntegration } from "../test/factories";
|
||||
import { flushdb, seed } from "../test/support";
|
||||
@@ -18,7 +18,7 @@ jest.mock("../slack", () => ({
|
||||
describe("#hooks.unfurl", () => {
|
||||
it("should return documents", async () => {
|
||||
const { user, document } = await seed();
|
||||
await Authentication.create({
|
||||
await IntegrationAuthentication.create({
|
||||
service: "slack",
|
||||
userId: user.id,
|
||||
teamId: user.teamId,
|
||||
|
||||
Reference in New Issue
Block a user