downloads endpoint route fix

This commit is contained in:
2026-07-28 10:55:30 +02:00
parent 4afa440b12
commit 6ea7a8ae69
3 changed files with 3 additions and 6 deletions
@@ -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?
+1 -2
View File
@@ -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 {