middleware

This commit is contained in:
Ulf Gebhardt 2023-06-12 14:07:12 +02:00
parent d6c75124aa
commit b1c3559806
Signed by: ulfgebhardt
GPG Key ID: DA6B843E748679C9
3 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ export default function (content) {
return $(el).attr('data-hashtag-id')
})
.get()
const hashtags = []
const hashtags: any = []
ids.forEach((id) => {
const match = exec(id, regX)
if (match != null) {

View File

@ -6,7 +6,7 @@ import { htmlToText } from 'nodemailer-html-to-text'
const hasEmailConfig = CONFIG.SMTP_HOST && CONFIG.SMTP_PORT
const hasAuthData = CONFIG.SMTP_USERNAME && CONFIG.SMTP_PASSWORD
let sendMailCallback = async () => {}
let sendMailCallback: any = async () => {}
if (!hasEmailConfig) {
if (!CONFIG.TEST) {
// eslint-disable-next-line no-console
@ -29,7 +29,7 @@ if (!hasEmailConfig) {
cleanHtml(templateArgs.html, 'dummyKey', {
allowedTags: ['a'],
allowedAttributes: { a: ['href'] },
}).replace(/&/g, '&'),
} as any).replace(/&/g, '&'),
)
}
}

View File

@ -1,7 +1,7 @@
import { sentry } from 'graphql-middleware-sentry'
import CONFIG from '../config'
let sentryMiddleware = (resolve, root, args, context, resolveInfo) =>
let sentryMiddleware: any = (resolve, root, args, context, resolveInfo) =>
resolve(root, args, context, resolveInfo)
if (CONFIG.SENTRY_DSN_BACKEND) {
@ -12,7 +12,7 @@ if (CONFIG.SENTRY_DSN_BACKEND) {
release: CONFIG.COMMIT,
environment: CONFIG.NODE_ENV,
},
withScope: (scope, error, context) => {
withScope: (scope, error, context: any) => {
scope.setUser({
id: context.user && context.user.id,
})