Skip to content

Commit

Permalink
feat: add id property
Browse files Browse the repository at this point in the history
  • Loading branch information
sinkaroid committed Jun 28, 2022
1 parent 220a805 commit cfefdb0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/scraper/stats/statsGetController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {

interface IGetData {
title: string;
id: string;
description: string;
avatar: string;
server_count: number;
Expand Down Expand Up @@ -141,8 +142,12 @@ export async function scrapeContent(url: string) {
});
}

//get id= from url
const id = url.split("/")[4];

const objectData: IGetData = {
title: title,
id: id,
description: info,
avatar: image,
server_count: servers,
Expand Down

0 comments on commit cfefdb0

Please sign in to comment.