Skip to content

Commit

Permalink
Merge pull request #376 from ggwadera/removeDownload
Browse files Browse the repository at this point in the history
Remove download button
  • Loading branch information
songz authored Sep 1, 2020
2 parents 704b582 + 73a363a commit 975d75d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
9 changes: 0 additions & 9 deletions src/api/mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,15 +151,6 @@ mappingRouter.delete('/:id', async (req, res) => {
})
})

mappingRouter.get('/download', (req, res) => {
const filePath = `${WORKPATH}/${req.query.fullDomain}/deploy.config.js`
res.setHeader('Content-disposition', 'attachment; filename=deploy.config.js')
res.setHeader('Content-type', 'application/javascript')
res.download(filePath, err => {
console.log('Failed to download file', err)
})
})

mappingRouter.get('/:id', (req, res) => {
const foundDomain = getMappingById(req.params.id)
res.json(foundDomain || {})
Expand Down
7 changes: 0 additions & 7 deletions src/public/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,13 +108,6 @@ class MappingItem {
${data.gitLink}
</small>
</div>
<a
href="/api/mappings/download/?fullDomain=${data.fullDomain}"
target="_blank"
class="btn btn-sm btn-outline-success mr-3"
>
Download<i class="fa fa-download"></i>
</a>
<button
class="btn btn-sm btn-outline-danger mr-3 deleteButton"
type="button"
Expand Down

0 comments on commit 975d75d

Please sign in to comment.