Skip to content
This repository has been archived by the owner on Oct 21, 2024. It is now read-only.

Commit

Permalink
Fix for RELEASES URLs not containing the app name when using Nuts as …
Browse files Browse the repository at this point in the history
…an Express middleware

From GitbookIO#159
  • Loading branch information
rastiqdev committed Jun 22, 2023
1 parent e38df2b commit 8ce609d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/nuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var _ = require("lodash")
var Q = require("q")
var Feed = require("feed")
var urljoin = require("urljoin.js")
var url = require("url")
var Understudy = require("understudy")
var express = require("express")
var useragent = require("express-useragent")
Expand Down Expand Up @@ -375,9 +376,9 @@ Nuts.prototype.onUpdateWin = function (req, res, next) {
var gitFilePath =
channel === "*" ? "../../../../" : "../../../../../../"
entry.filename = urljoin(
fullUrl,
fullUrl.replace(url.parse(fullUrl).search, ""),
gitFilePath,
`download/${entry.semver}/${entry.filename}`,
"/download/" + entry.semver + "/" + entry.filename,
)

return entry
Expand Down

0 comments on commit 8ce609d

Please sign in to comment.