Skip to content

Commit

Permalink
production: + logs
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiy4 committed Sep 28, 2024
1 parent 53d8def commit 7ffed9f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion backend/src/bundles/public-video/public-video.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ class PublicVideoController extends BaseController {
): Promise<ApiHandlerResponse> {
const headers = options.headers as Record<string, { value: string }>;
const videoTokenHeader = headers['video_token']?.toString() ?? '';

// eslint-disable-next-line no-console
console.log(videoTokenHeader);
return {
status: HTTPCode.OK,
payload:
Expand Down
3 changes: 2 additions & 1 deletion backend/src/bundles/videos/video.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ class VideoRepository implements Repository {

public async findById(id: string): Promise<VideoEntity | null> {
const video = await this.videoModel.query().findById(id).execute();

// eslint-disable-next-line no-console
console.log(video);
return video ? VideoEntity.initialize(video) : null;
}

Expand Down
2 changes: 2 additions & 0 deletions backend/src/common/services/token/token.services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ class TokenService {

public async getIdFromToken(token: string): Promise<string | null> {
const payload = await this.verifyToken(token);
// eslint-disable-next-line no-console
console.log(payload);
return (payload?.['id'] as string) ?? null;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PublicVideosApi extends BaseHttpApi {
headers.append('video_token', jwt.replaceAll('~', '.'));

// eslint-disable-next-line no-console
console.log('headers', headers);
console.log('headers', headers.get('video_token'));

const options = {
method: HTTPMethod.GET,
Expand Down

0 comments on commit 7ffed9f

Please sign in to comment.