downloads endpoint route fix
This commit is contained in:
+1
-3
@@ -1,6 +1,4 @@
|
||||
class DownloadsController < ApplicationController
|
||||
skip_forgery_protection
|
||||
|
||||
class Api::DownloadsController < ApiController
|
||||
def show
|
||||
path = params[:path]
|
||||
return head :bad_request if path.blank?
|
||||
@@ -11,9 +11,8 @@ Rails.application.routes.draw do
|
||||
get "wiki/pages", to: "wiki#index"
|
||||
get "rss/blog", to: "rss#blog"
|
||||
get "rss/releases", to: "rss#releases"
|
||||
get "download", to: "downloads#show"
|
||||
end
|
||||
|
||||
get "download", to: "downloads#show"
|
||||
get "update", to: "update#update"
|
||||
get "file/*path", to: "files#show", format: false
|
||||
end
|
||||
|
||||
@@ -254,7 +254,7 @@ const allReleases = computed(() => [...stableReleases.value, ...devReleases.valu
|
||||
const latestStable = computed(() => stableReleases.value[0] ?? null)
|
||||
|
||||
const downloadUrl = (path: string) =>
|
||||
`/download?path=${encodeURIComponent(path.replace('/file/', ''))}`
|
||||
`/api/download?path=${encodeURIComponent(path.replace('/file/', ''))}`
|
||||
|
||||
onMounted(async () => {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user