fix: Eslint offenses for backend package
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import qs from 'qs';
|
||||
import defineAction from '../../../../helpers/define-action';
|
||||
|
||||
export default defineAction({
|
||||
@@ -19,7 +18,8 @@ export default defineAction({
|
||||
key: 'message',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Message body to be sent, set to triggered if empty or not passed.',
|
||||
description:
|
||||
'Message body to be sent, set to triggered if empty or not passed.',
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
@@ -67,22 +67,15 @@ export default defineAction({
|
||||
key: 'delay',
|
||||
type: 'string' as const,
|
||||
required: false,
|
||||
description: 'Timestamp or duration for delayed delivery. For example, 30min or 9am.',
|
||||
description:
|
||||
'Timestamp or duration for delayed delivery. For example, 30min or 9am.',
|
||||
variables: true,
|
||||
},
|
||||
],
|
||||
|
||||
async run($) {
|
||||
const {
|
||||
topic,
|
||||
message,
|
||||
title,
|
||||
email,
|
||||
click,
|
||||
attach,
|
||||
filename,
|
||||
delay
|
||||
} = $.step.parameters;
|
||||
const { topic, message, title, email, click, attach, filename, delay } =
|
||||
$.step.parameters;
|
||||
const payload = {
|
||||
topic,
|
||||
message,
|
||||
@@ -91,7 +84,7 @@ export default defineAction({
|
||||
click,
|
||||
attach,
|
||||
filename,
|
||||
delay
|
||||
delay,
|
||||
};
|
||||
|
||||
const response = await $.http.post('/', payload);
|
||||
|
@@ -1,4 +1,3 @@
|
||||
import qs from 'qs';
|
||||
import defineAction from '../../../../helpers/define-action';
|
||||
|
||||
export default defineAction({
|
||||
@@ -11,7 +10,8 @@ export default defineAction({
|
||||
key: 'chatId',
|
||||
type: 'string' as const,
|
||||
required: true,
|
||||
description: 'Unique identifier for the target chat or username of the target channel (in the format @channelusername).',
|
||||
description:
|
||||
'Unique identifier for the target chat or username of the target channel (in the format @channelusername).',
|
||||
variables: true,
|
||||
},
|
||||
{
|
||||
@@ -28,7 +28,8 @@ export default defineAction({
|
||||
type: 'dropdown' as const,
|
||||
required: false,
|
||||
value: false,
|
||||
description: 'Sends the message silently. Users will receive a notification with no sound.',
|
||||
description:
|
||||
'Sends the message silently. Users will receive a notification with no sound.',
|
||||
variables: true,
|
||||
options: [
|
||||
{
|
||||
|
@@ -1,6 +1,7 @@
|
||||
import logger from './logger';
|
||||
|
||||
// Do not remove `next` argument as the function signature will not fit for an error handler middleware
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const errorHandler = (err, req, res, next) => {
|
||||
if (err.message === 'Not Found') {
|
||||
res.status(404).end();
|
||||
|
@@ -1,7 +1,6 @@
|
||||
import SamlAuthProvider from '../models/saml-auth-provider.ee';
|
||||
import User from '../models/user';
|
||||
import Identity from '../models/identity.ee';
|
||||
import SamlAuthProvidersRoleMapping from '../models/saml-auth-providers-role-mapping.ee';
|
||||
|
||||
const getUser = (
|
||||
user: Record<string, unknown>,
|
||||
|
Reference in New Issue
Block a user