Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

push a bunch of console.logs

Amruth Pillaiebe13fa82e1b
diff --git a/client/pages/[username]/[slug]/index.tsx b/client/pages/[username]/[slug]/index.tsx
index d7459f8c5..e50b52c36 100644
--- a/client/pages/[username]/[slug]/index.tsx
+++ b/client/pages/[username]/[slug]/index.tsx
@@ -39,8 +39,6 @@ export const getServerSideProps: GetServerSideProps<Props> = async ({ query, loc
try {
const resume = await fetchResumeByIdentifier({ username, slug });
- console.log('Preview~getServerSideProps~resume', resume);
-
return {
props: { username, slug, resume, ...(await serverSideTranslations(locale, ['common'])) },
};
@@ -63,8 +61,6 @@ const Preview: NextPage<Props> = ({ username, slug, resume: initialData }) => {
}, [dispatch, initialData]);
useEffect(() => {
- console.log('Preview~useEffect~resume', resume);
-
const locale = get(resume, 'metadata.locale', 'en');
if (!isEmpty(resume) && router.locale !== locale) {
diff --git a/client/services/resume.ts b/client/services/resume.ts
index acaac0dfd..ba9464352 100644
--- a/client/services/resume.ts
+++ b/client/services/resume.ts
@@ -64,10 +64,22 @@ export const fetchResumeByIdentifier = async ({
if (!isBrowser) {
const secretKey = options.secretKey;
- return axios.get<Resume>(`/resume/${username}/${slug}`, { params: { secretKey } }).then((res) => res.data);
+ console.log('ResumeService~fetchResumeByIdentifier', 'isNotBrowser', username, slug, secretKey);
+
+ const resume = axios.get<Resume>(`/resume/${username}/${slug}`, { params: { secretKey } }).then((res) => res.data);
+
+ console.log('ResumeService~fetchResumeByIdentifier', 'isNotBrowser', resume);
+
+ return resume;
}
- return axios.get<Resume>(`/resume/${username}/${slug}`).then((res) => res.data);
+ console.log('ResumeService~fetchResumeByIdentifier', 'isBrowser', username, slug);
+
+ const resume = axios.get<Resume>(`/resume/${username}/${slug}`).then((res) => res.data);
+
+ console.log('ResumeService~fetchResumeByIdentifier', 'isBrowser', resume);
+
+ return resume;
};
export const fetchResumeByShortId = async ({ shortId }: FetchResumeByShortIdParams) =>
diff --git a/server/src/resume/resume.controller.ts b/server/src/resume/resume.controller.ts
index 7f44762a8..502b63407 100644
--- a/server/src/resume/resume.controller.ts
+++ b/server/src/resume/resume.controller.ts
@@ -56,6 +56,8 @@ export class ResumeController {
@User('id') userId?: number,
@Query('secretKey') secretKey?: string
) {
+ console.log('ResumeController~findOneByIdentifier', username, slug, userId, secretKey);
+
return this.resumeService.findOneByIdentifier(username, slug, userId, secretKey);
}
diff --git a/server/src/resume/resume.service.ts b/server/src/resume/resume.service.ts
index 0393cb1ef..6714848b0 100644
--- a/server/src/resume/resume.service.ts
+++ b/server/src/resume/resume.service.ts
@@ -162,6 +162,8 @@ export class ResumeService {
throw new HttpException('The resume you are looking does not exist, or maybe never did?', HttpStatus.NOT_FOUND);
}
+ console.log('ResumeService~findOneByIdentifier', resume);
+
return resume;
}