fix: Import App model for create connection query
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import App from '../../models/app';
|
||||||
import Context from '../../types/express/context';
|
import Context from '../../types/express/context';
|
||||||
import { IJSONObject } from '@automatisch/types';
|
import { IJSONObject } from '@automatisch/types';
|
||||||
|
|
||||||
@@ -14,12 +15,10 @@ const createConnection = async (
|
|||||||
) => {
|
) => {
|
||||||
App.findOneByKey(params.input.key);
|
App.findOneByKey(params.input.key);
|
||||||
|
|
||||||
return await context.currentUser
|
return await context.currentUser.$relatedQuery('connections').insert({
|
||||||
.$relatedQuery('connections')
|
key: params.input.key,
|
||||||
.insert({
|
formattedData: params.input.formattedData,
|
||||||
key: params.input.key,
|
});
|
||||||
formattedData: params.input.formattedData,
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default createConnection;
|
export default createConnection;
|
||||||
|
Reference in New Issue
Block a user