Skip to content

Commit

Permalink
fix(theme): use denormalize theme name for server request (#410)
Browse files Browse the repository at this point in the history
  • Loading branch information
cukejianya committed Nov 25, 2020
1 parent 0d5cf45 commit d7e25fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/builder/index.js
Expand Up @@ -5,12 +5,16 @@ const request = require('superagent');
const chalk = require('chalk');
const renderHtml = require('../render-html');

const denormalizeTheme = (value) => {
return value.match(/jsonresume-theme-(.*)/)[1];
};

const sendExportHTML = (resumeJson, theme, callback) => {
console.log(resumeJson, theme);
console.log('Requesting theme from server...');

request
.post(themeServer + theme)
.post(themeServer + denormalizeTheme(theme))
.send({
resume: resumeJson,
})
Expand Down

0 comments on commit d7e25fc

Please sign in to comment.