Fix imports

pull/73/head
MillenniumEarl 2021-03-02 20:58:45 +01:00
parent cb9b0b1207
commit 597cb52e09
2 changed files with 6 additions and 3 deletions

View File

@ -7,7 +7,7 @@ import { authenticate, urlExists, isF95URL } from "./scripts/network-helper.js";
import { getUserData as retrieveUserData } from "./scripts/scrape-data/scrape-user.js"; import { getUserData as retrieveUserData } from "./scripts/scrape-data/scrape-user.js";
import fetchLatestHandiworkURLs from "./scripts/fetch-data/fetch-latest.js"; import fetchLatestHandiworkURLs from "./scripts/fetch-data/fetch-latest.js";
import fetchPlatformData from "./scripts/fetch-data/fetch-platform-data.js"; import fetchPlatformData from "./scripts/fetch-data/fetch-platform-data.js";
import { getHandiworkInformation } from "./scripts/scrape-data/scrape-thread.js"; import { getHandiworkInformation } from "./scripts/scrape-data/handiwork-parse.js";
import { IBasic } from "./scripts/interfaces.js"; import { IBasic } from "./scripts/interfaces.js";
// Classes from file // Classes from file
@ -67,7 +67,10 @@ export async function login(username: string, password: string): Promise<LoginRe
shared.setIsLogged(result.success); shared.setIsLogged(result.success);
// Load platform data // Load platform data
if (result.success) await fetchPlatformData(); if (result.success) {
await fetchPlatformData();
shared.session.create(username, password, creds.token);
}
/* istambul ignore next */ /* istambul ignore next */
if (result.success) shared.logger.info("User logged in through the platform"); if (result.success) shared.logger.info("User logged in through the platform");

View File

@ -5,7 +5,7 @@ import { IBasic } from "./interfaces.js";
import HandiworkSearchQuery from "./classes/query/handiwork-search-query.js"; import HandiworkSearchQuery from "./classes/query/handiwork-search-query.js";
import LatestSearchQuery from "./classes/query/latest-search-query.js"; import LatestSearchQuery from "./classes/query/latest-search-query.js";
import ThreadSearchQuery from "./classes/query/thread-search-query.js"; import ThreadSearchQuery from "./classes/query/thread-search-query.js";
import { getHandiworkInformation } from "./scrape-data/scrape-thread.js"; import { getHandiworkInformation } from "./scrape-data/handiwork-parse.js";
import executeQuery from "./fetch-data/fetch-query.js"; import executeQuery from "./fetch-data/fetch-query.js";
export async function search<T extends IBasic>(query: LatestSearchQuery, limit: number): Promise<T[]> export async function search<T extends IBasic>(query: LatestSearchQuery, limit: number): Promise<T[]>