You've already forked AstralRinth
forked from didirus/AstralRinth
Add .file class + Generator user agent
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
import { fetch } from 'undici'
|
||||
import { fetch } from '../fetch.js'
|
||||
import { promises as fs } from 'fs'
|
||||
import cliProgress from 'cli-progress'
|
||||
|
||||
export async function landingPage(API_URL) {
|
||||
export async function landingPage() {
|
||||
const progressBar = new cliProgress.SingleBar({
|
||||
format: 'Generating landing page | {bar} | {percentage}% || {value}/{total} mods',
|
||||
barCompleteChar: '\u2588',
|
||||
@@ -12,9 +12,7 @@ export async function landingPage(API_URL) {
|
||||
progressBar.start(100, 0)
|
||||
|
||||
// Fetch top 100 mods
|
||||
const response = await (
|
||||
await fetch(API_URL + 'search?limit=100&facets=[["project_type:mod"]]')
|
||||
).json()
|
||||
const response = await (await fetch('search?limit=100&facets=[["project_type:mod"]]')).json()
|
||||
|
||||
// Simplified array with the format: ['id', 'slug', 'icon_extension']
|
||||
const compressed = response.hits
|
||||
|
||||
Reference in New Issue
Block a user