mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
middleware
This commit is contained in:
parent
d6c75124aa
commit
b1c3559806
@ -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) {
|
||||
|
||||
@ -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, '&'),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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,
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user