Skip to content

Commit

Permalink
debug web & api
Browse files Browse the repository at this point in the history
  • Loading branch information
LittleNa1000 committed Nov 1, 2024
1 parent eeab49f commit 149ac72
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apps/api/src/app.service.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { Injectable } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';

@Injectable()
export class AppService {
constructor(private configService: ConfigService) {}
getHello(): string {
return 'Hello World!';
return `Hello World! ${process.env.CLIENT_URL} ${this.configService.get<string>('CLIENT_URL')} ${process.env.BUCKET_NAME} ${this.configService.get<string>('BUCKET_NAME')}`;
}
}
4 changes: 3 additions & 1 deletion apps/web/src/service/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { cookies } from 'next/headers';
import { trpc } from '../app/trpc';
import type { Payload, Tokens } from '../interface/auth';
import { authErrors } from '../errors/auth';
import { env } from 'next-runtime-env';

export async function getCookies(): Promise<Tokens> {
try {
Expand Down Expand Up @@ -34,7 +35,8 @@ export async function signIn(
JSON.stringify({ token }),
'destination:',
process.env.NEXT_PUBLIC_API_SERVER_URL,
'auth/signin',
'destination (env):',
env('NEXT_PUBLIC_API_SERVER_URL'),
);

const data = await trpc.authRouter.signin.mutate({ token }).catch((err) => {
Expand Down

0 comments on commit 149ac72

Please sign in to comment.