mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-14 16:51:33 +10:00
push a bunch of console.logs
This commit is contained in:
@ -39,8 +39,6 @@ export const getServerSideProps: GetServerSideProps<Props> = async ({ query, loc
|
|||||||
try {
|
try {
|
||||||
const resume = await fetchResumeByIdentifier({ username, slug });
|
const resume = await fetchResumeByIdentifier({ username, slug });
|
||||||
|
|
||||||
console.log('Preview~getServerSideProps~resume', resume);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
props: { username, slug, resume, ...(await serverSideTranslations(locale, ['common'])) },
|
props: { username, slug, resume, ...(await serverSideTranslations(locale, ['common'])) },
|
||||||
};
|
};
|
||||||
@ -63,8 +61,6 @@ const Preview: NextPage<Props> = ({ username, slug, resume: initialData }) => {
|
|||||||
}, [dispatch, initialData]);
|
}, [dispatch, initialData]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.log('Preview~useEffect~resume', resume);
|
|
||||||
|
|
||||||
const locale = get(resume, 'metadata.locale', 'en');
|
const locale = get(resume, 'metadata.locale', 'en');
|
||||||
|
|
||||||
if (!isEmpty(resume) && router.locale !== locale) {
|
if (!isEmpty(resume) && router.locale !== locale) {
|
||||||
|
|||||||
@ -64,10 +64,22 @@ export const fetchResumeByIdentifier = async ({
|
|||||||
if (!isBrowser) {
|
if (!isBrowser) {
|
||||||
const secretKey = options.secretKey;
|
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) =>
|
export const fetchResumeByShortId = async ({ shortId }: FetchResumeByShortIdParams) =>
|
||||||
|
|||||||
@ -56,6 +56,8 @@ export class ResumeController {
|
|||||||
@User('id') userId?: number,
|
@User('id') userId?: number,
|
||||||
@Query('secretKey') secretKey?: string
|
@Query('secretKey') secretKey?: string
|
||||||
) {
|
) {
|
||||||
|
console.log('ResumeController~findOneByIdentifier', username, slug, userId, secretKey);
|
||||||
|
|
||||||
return this.resumeService.findOneByIdentifier(username, slug, userId, secretKey);
|
return this.resumeService.findOneByIdentifier(username, slug, userId, secretKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -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);
|
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;
|
return resume;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user