Type server models (#6326)
* fix: type server models * fix: make ParanoidModel generic * fix: ApiKey * fix: Attachment * fix: AuthenticationProvider * fix: Backlink * fix: Collection * fix: Comment * fix: Document * fix: FileOperation * fix: Group * fix: GroupPermission * fix: GroupUser * fix: Integration * fix: IntegrationAuthentication * fix: Notification * fix: Pin * fix: Revision * fix: SearchQuery * fix: Share * fix: Star * fix: Subscription * fix: TypeError * fix: Imports * fix: Team * fix: TeamDomain * fix: User * fix: UserAuthentication * fix: UserPermission * fix: View * fix: WebhookDelivery * fix: WebhookSubscription * Remove type duplication --------- Co-authored-by: Tom Moor <tom.moor@gmail.com>
This commit is contained in:
@@ -200,7 +200,8 @@ if (env.SLACK_CLIENT_ID && env.SLACK_CLIENT_SECRET) {
|
||||
const { user } = ctx.state.auth;
|
||||
assertPresent(code || error, "code is required");
|
||||
|
||||
const collectionId = state;
|
||||
// FIX ME! What about having zod like schema in place here?
|
||||
const collectionId = state as string;
|
||||
assertUuid(collectionId, "collectionId must be an uuid");
|
||||
|
||||
if (error) {
|
||||
|
||||
@@ -60,6 +60,7 @@ import {
|
||||
TeamEvent,
|
||||
UserEvent,
|
||||
ViewEvent,
|
||||
WebhookDeliveryStatus,
|
||||
WebhookSubscriptionEvent,
|
||||
} from "@server/types";
|
||||
import fetch from "@server/utils/fetch";
|
||||
@@ -572,7 +573,8 @@ export default class DeliverWebhookTask extends BaseTask<Props> {
|
||||
status: "pending",
|
||||
});
|
||||
|
||||
let response, requestBody, requestHeaders, status;
|
||||
let response, requestBody, requestHeaders;
|
||||
let status: WebhookDeliveryStatus;
|
||||
try {
|
||||
requestBody = presentWebhook({
|
||||
event,
|
||||
|
||||
Reference in New Issue
Block a user