Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkPhoenix2704 committed May 1, 2023
1 parent 13b38f2 commit 5e2c356
Show file tree
Hide file tree
Showing 8 changed files with 540 additions and 288 deletions.
46 changes: 23 additions & 23 deletions apps/api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,39 +15,39 @@
"db:migrate": "prisma migrate deploy --schema ./prisma/schema.prisma"
},
"dependencies": {
"@fastify/static": "^6.9.0",
"@fastify/static": "^6.10.1",
"@nestjs-modules/mailer": "^1.8.1",
"@nestjs/axios": "^1.0.1",
"@nestjs/common": "^9.2.1",
"@nestjs/config": "^2.2.0",
"@nestjs/core": "^9.2.1",
"@nestjs/event-emitter": "^1.3.1",
"@nestjs/platform-fastify": "^9.2.1",
"@nestjs/schematics": "^9.0.4",
"@nestjs/swagger": "^6.1.4",
"@nestjs/axios": "^2.0.0",
"@nestjs/common": "^9.4.0",
"@nestjs/config": "^2.3.1",
"@nestjs/core": "^9.4.0",
"@nestjs/event-emitter": "^1.4.1",
"@nestjs/platform-fastify": "^9.4.0",
"@nestjs/schematics": "^9.1.0",
"@nestjs/swagger": "^6.3.0",
"@nestjs/throttler": "^4.0.0",
"@prisma/client": "^4.11.0",
"@react-email/components": "^0.0.4",
"@prisma/client": "^4.13.0",
"@react-email/components": "^0.0.6",
"@webtre/nestjs-mailer-react-adapter": "^0.0.9",
"axios": "^1.2.5",
"axios": "^1.4.0",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"joi": "^17.7.0",
"nestjs-pino": "^3.1.2",
"joi": "^17.9.2",
"nestjs-pino": "^3.2.0",
"nodemailer": "^6.9.1",
"pino-http": "^8.3.1",
"pino-pretty": "^9.1.1",
"pino-http": "^8.3.3",
"pino-pretty": "^10.0.0",
"reflect-metadata": "^0.1.13",
"rimraf": "^4.1.2",
"rxjs": "^7.8.0",
"supertokens-node": "^12.1.6"
"rimraf": "^5.0.0",
"rxjs": "^7.8.1",
"supertokens-node": "^13.5.0"
},
"devDependencies": {
"@nestjs/cli": "^9.1.9",
"@types/node": "^18.11.18",
"@nestjs/cli": "^9.4.2",
"@types/node": "^18.16.3",
"@types/nodemailer": "^6.4.7",
"@types/react": "^18.0.29",
"prisma": "^4.11.0",
"@types/react": "^18.2.0",
"prisma": "^4.13.0",
"ts-node": "^10.9.1"
}
}
6 changes: 2 additions & 4 deletions apps/api/src/app.controller.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Controller, Get, UseGuards } from '@nestjs/common';
import { AuthGuard } from './auth/auth.guard';
import { Controller, Get } from '@nestjs/common';

@Controller()
export class AppController {
@Get()
@UseGuards(new AuthGuard())
getHello(): string {
return 'Hello World!';
return 'I am working fine dude!';
}
}
2 changes: 1 addition & 1 deletion apps/api/src/app.module.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as Joi from 'joi';
import Joi from 'joi';
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { LoggerModule } from 'nestjs-pino';
Expand Down
5 changes: 2 additions & 3 deletions apps/api/src/auth/auth.guard.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

import {
CanActivate,
ExecutionContext,
Expand All @@ -13,7 +11,8 @@ import { Error as STError } from 'supertokens-node';
@Injectable()
export class AuthGuard implements CanActivate {
async canActivate(context: ExecutionContext): Promise<boolean> {
let ctx: any, resp: any;
let ctx: any;
let resp: any;
try {
ctx = context.switchToHttp();

Expand Down
42 changes: 30 additions & 12 deletions apps/api/src/mail/templates/create.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Container, Head, Html, Preview, Text, Section, Img } from '@react-email/components';
import { Container, Head, Html, Preview, Text, Section, Img, Font } from '@react-email/components';

const main = {
fontFamily: 'Clash Display, Arial, sans-serif',
Expand All @@ -12,7 +12,7 @@ const container = {
};
const h1 = {
color: 'white',
fontWeight: 800,
fontWeight: 700,
fontSize: '18px',
};
const body = {
Expand Down Expand Up @@ -53,15 +53,33 @@ interface Props {
const Create = ({ teamID }: Props) => (
<Html lang="en">
<Head>
<link
href="https://fonts.cdnfonts.com/css/clash-display?styles=106288,106285,106286,106287,106289,106284"
rel="stylesheet"
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={400}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplayRegular.woff',
format: 'woff2',
}}
/>
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={600}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplaySemibold.woff',
format: 'woff2',
}}
/>
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={700}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplayBold.woff',
format: 'woff2',
}}
/>
<style>
` @import
url(https://fonts.cdnfonts.com/css/clash-display?styles=106288,106285,106286,106287,106289,106284);
`
</style>
</Head>
<Preview>Welcome to Saturday HackNight</Preview>
<Section style={main}>
Expand All @@ -79,8 +97,8 @@ const Create = ({ teamID }: Props) => (
Your team has been created
</Text>
<Text style={textSeco}>
An Invitation mail to join the team has been send to all Team Members. They
will be part of your team once they accept the invitation.
An unique Invitation mail to join the team has been send to all Team
Members. They will be part of your team once they accept the invitation.
</Text>
</Container>
<Text style={textTert}>
Expand Down
45 changes: 37 additions & 8 deletions apps/api/src/mail/templates/invite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
Section,
Img,
Button,
Font,
} from '@react-email/components';

const main = {
Expand All @@ -21,7 +22,7 @@ const container = {
};
const h1 = {
color: 'white',
fontWeight: 800,
fontWeight: 700,
fontSize: '18px',
};
const body = {
Expand Down Expand Up @@ -74,14 +75,42 @@ interface Props {
const Invite = ({ teamName, lead, inviteCode, teamID }: Props) => (
<Html lang="en">
<Head>
<link
href="https://fonts.cdnfonts.com/css/clash-display?styles=106288,106285,106286,106287,106289,106284"
rel="stylesheet"
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={400}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplayRegular.woff',
format: 'woff2',
}}
/>
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={600}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplaySemibold.woff',
format: 'woff2',
}}
/>
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={700}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplayBold.woff',
format: 'woff2',
}}
/>
<Font
fontFamily="Clash Display"
fallbackFontFamily="Arial"
fontWeight={500}
webFont={{
url: 'https://fonts.cdnfonts.com/s/65008/ClashDisplayMedium.woff',
format: 'woff2',
}}
/>
<style>
@import
url(https://fonts.cdnfonts.com/css/clash-display?styles=106288,106285,106286,106287,106289,106284);
</style>
</Head>
<Preview>Welcome to Saturday HackNight</Preview>
<Section style={main}>
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async function bootstrap() {
const config = new DocumentBuilder()
.setTitle('SHN Platform APIs')
.setDescription('APIs provided by SHN Platform')
.setVersion('0.0.1')
.setVersion('1.0.0')
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('docs', app, document);
Expand Down
Loading

0 comments on commit 5e2c356

Please sign in to comment.