Skip to content

Commit

Permalink
fix: correct rolled back build
Browse files Browse the repository at this point in the history
  • Loading branch information
0-vortex committed May 10, 2023
1 parent f0b854a commit e91c43f
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 18 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ module.exports = {
"public",
"/**/node_modules/*",
".eslintrc.js",
"migrations",
],
rules: {
// eslint:recommended
Expand Down
4 changes: 4 additions & 0 deletions src/github/entities/db-reaction.entity.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export interface DbReaction {
emoji_id: string;
reaction_count: string;
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
interface DbHighlight {
export interface DbUserHighlight {
readonly id: string;
readonly user_id: string;
readonly url: string;
Expand All @@ -10,8 +10,3 @@ interface DbHighlight {
readonly deleted_at: string | null;
readonly login: string;
}

interface DbReaction {
emoji_id: string;
reaction_count: string;
}
1 change: 1 addition & 0 deletions src/s3-file-storage/s3-file-storage.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Readable } from "node:stream";

import DigitalOceanConfig from "../config/digital-ocean.config";


@Injectable()
export class S3FileStorageService {
private readonly s3Client: S3Client;
Expand Down
12 changes: 10 additions & 2 deletions src/social-card/highlight-card/highlight-card.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import userProfileRepos from "../templates/shared/user-repos";
import tailwindConfig from "../templates/tailwind.config";
import { firstValueFrom } from "rxjs";
import highlightCardTemplate from "../templates/highlight-card.template";
import RequiresUpdateMeta from "../../../typings/RequiresUpdateMeta";
import { DbUserHighlight } from "../../github/entities/db-user-highlight.entity";
import { DbReaction } from "../../github/entities/db-reaction.entity";
import { RequiresUpdateMeta } from "../user-card/user-card.service";

interface HighlightCardData {
title: string,
Expand All @@ -38,7 +40,13 @@ export class HighlightCardService {
) {}

private async getHighlightData (highlightId: number): Promise<HighlightCardData> {
const highlightReq = await firstValueFrom(this.httpService.get<DbHighlight>(`https://api.opensauced.pizza/v1/user/highlights/${highlightId}`));
const langs: Record<string, Language & {

Check failure on line 43 in src/social-card/highlight-card/highlight-card.service.ts

View workflow job for this annotation

GitHub Actions / Test and lint / Code standards

'langs' is assigned a value but never used
size: number,
}> = {};
const today = (new Date);
const today30daysAgo = new Date((new Date).setDate(today.getDate() - 30));

Check failure on line 47 in src/social-card/highlight-card/highlight-card.service.ts

View workflow job for this annotation

GitHub Actions / Test and lint / Code standards

'today30daysAgo' is assigned a value but never used

const highlightReq = await firstValueFrom(this.httpService.get<DbUserHighlight>(`https://api.opensauced.pizza/v1/user/highlights/${highlightId}`));
const { login, title, highlight: body, updated_at, url } = highlightReq.data;

const reactionsReq = await firstValueFrom(this.httpService.get<DbReaction[]>(`https://api.opensauced.pizza/v1/highlights/${highlightId}/reactions`));
Expand Down
9 changes: 7 additions & 2 deletions src/social-card/user-card/user-card.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ import userLangs from "../templates/shared/user-langs";
import userProfileRepos from "../templates/shared/user-repos";
import userProfileCardTemplate from "../templates/user-profile-card.template";
import tailwindConfig from "../templates/tailwind.config";
import RequiresUpdateMeta from "../../../typings/RequiresUpdateMeta";

interface UserCardData {
export interface UserCardData {
id: User["databaseId"],
name: User["name"],
langs: (Language & {
Expand All @@ -25,6 +24,12 @@ interface UserCardData {
formattedName: string,
}

export interface RequiresUpdateMeta {
fileUrl: string,
hasFile: boolean;
needsUpdate: boolean;
lastModified: Date | null,
}

@Injectable()
export class UserCardService {
Expand Down
7 changes: 0 additions & 7 deletions typings/RequiresUpdateMeta.ts

This file was deleted.

0 comments on commit e91c43f

Please sign in to comment.