Skip to content

Commit

Permalink
Fix platform query not working correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
Katrix committed Oct 17, 2023
1 parent cfb512f commit b973426
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion apiV2/app/controllers/apiv2/Projects.scala
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,6 @@ class Projects(
.map { project =>
val urlOwner = URLEncoder.encode(project.ownerName, "UTF-8")
val urlSlug = URLEncoder.encode(project.slug, "UTF-8")
println(s"/api/v2/projects/$urlOwner/$urlSlug/$path")
Redirect(
s"/api/v2/projects/$urlOwner/$urlSlug/$path",
request.queryString ++ Map("ore-dont-pluginid-redirect" -> Seq("true")),
Expand Down
2 changes: 1 addition & 1 deletion apiV2/app/db/impl/query/apiv2/ProjectQueries.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object ProjectQueries extends APIV2Queries {
| FROM (SELECT unnest(ppv.platforms) AS platform,
| unnest(ppv.platform_coarse_versions) AS platform_coarse_version,
| ppv.stability
| FROM promoted_versions ppv) AS promoted """.stripMargin ++
| FROM promoted_versions ppv WHERE ppv.project_id = p.id) AS promoted """.stripMargin ++
Fragments.whereAndOpt(
NonEmptyList
.fromList(platformsWithVersion)
Expand Down
1 change: 0 additions & 1 deletion ore/app/db/impl/query/AppQueries.scala
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,6 @@ object AppQueries extends DoobieOreProtocol {
fr"LIMIT $limit OFFSET $offset"
).query[DbRef[Project]]

println(res.sql)
res
}
}
2 changes: 1 addition & 1 deletion oreClient/src/main/assets/components/ProjectList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export default {
this.update()
this.debouncedUpdateProps = debounce(this.update, 500)
this.$watch(
(vm) => [vm.q, vm.categories, vm.tags, vm.owner, vm.sort, vm.relevance, vm.limit, vm.offset].join(),
(vm) => [vm.q, vm.categories, vm.platforms, vm.owner, vm.sort, vm.relevance, vm.limit, vm.offset].join(),
() => {
this.debouncedUpdateProps()
}
Expand Down
2 changes: 0 additions & 2 deletions orePlayCommon/app/db/impl/access/ProjectBase.scala
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ object ProjectBase {
p <- TableQuery[ProjectTable] if v.projectId === p.id
} yield (p.ownerName, p.name, v)

println(s"Foobar: ${allVersions.result.statements.toVector}")

service.runDBIO(allVersions.result).flatMap { versions =>
fileIO
.traverseLimited(versions.toVector) {
Expand Down

0 comments on commit b973426

Please sign in to comment.