fix: Type problems regarding global variable

This commit is contained in:
Faruk AYDIN
2022-10-06 00:49:24 +03:00
parent 8308265a62
commit 63ffd1f720
7 changed files with 21 additions and 24 deletions

View File

@@ -1,4 +1,4 @@
import { IGlobalVariableForConnection } from '@automatisch/types';
import { IGlobalVariable } from '@automatisch/types';
import getCurrentUser from '../../common/get-current-user';
import getUserByUsername from '../../common/get-user-by-username';
import getUserTweets from '../../common/get-user-tweets';
@@ -19,15 +19,15 @@ export default {
},
],
async run($: IGlobalVariableForConnection) {
async run($: IGlobalVariable) {
return this.getTweets($, await $.db.flow.lastInternalId());
},
async testRun($: IGlobalVariableForConnection) {
async testRun($: IGlobalVariable) {
return this.getTweets($);
},
async getTweets($: IGlobalVariableForConnection, lastInternalId?: string) {
async getTweets($: IGlobalVariable, lastInternalId?: string) {
const { username } = await getCurrentUser($);
const user = await getUserByUsername($, username);