Skip to content

Commit

Permalink
Merge pull request #52 from openlawlibrary/ndusan/fix-trailing-slash-…
Browse files Browse the repository at this point in the history
…versions

fix: resolve to `_api/versions` requests without trailing `/`
  • Loading branch information
n-dusan authored Sep 25, 2024
2 parents 7b51d07 + c9f7ffa commit 8c40d26
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 3 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,20 @@ and this project adheres to a _modified_ form of _[Semantic Versioning][semver]_

### Removed

## [0.3.1]

### Added

### Changed

### Fixed

- Fix resolve to `_api/versions` requests without trailing `/` ([52])

### Removed

[52]: https://github.com/openlawlibrary/stelae/pull/52

## [0.3.0]

### Added
Expand Down Expand Up @@ -96,7 +110,8 @@ and this project adheres to a _modified_ form of _[Semantic Versioning][semver]_

### Removed

[Unreleased]: https://github.com/openlawlibrary/stelae/compare/v0.3.0...HEAD
[Unreleased]: https://github.com/openlawlibrary/stelae/compare/v0.3.1...HEAD
[0.3.1]: https://github.com/openlawlibrary/stelae/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/openlawlibrary/stelae/compare/v0.2.1...v0.3.0
[0.2.1]: https://github.com/openlawlibrary/stelae/compare/v0.2.0...v0.2.1
[0.2.0]: https://github.com/openlawlibrary/stelae/compare/v0.1.1...v0.2.0
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "stelae"
description = "A collection of tools in Rust and Python for preserving, authenticating, and accessing laws in perpetuity."
version = "0.3.0"
version = "0.3.1"
edition = "2021"
readme = "README.md"
license = "AGPL-3.0"
Expand Down
6 changes: 6 additions & 0 deletions src/server/api/routes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ pub fn register_app<
.service(
web::scope("/_api").service(
web::scope("/versions")
.service(
web::resource("/_publication/{publication}/_compare/{date}/{compare_date}")
.to(versions),
)
.service(
web::resource(
"/_publication/{publication}/_compare/{date}/{compare_date}/{path:.*}",
Expand All @@ -53,9 +57,11 @@ pub fn register_app<
.service(web::resource("/_publication/{publication}/_date/{date}").to(versions))
.service(web::resource("/_publication/{publication}").to(versions))
.service(web::resource("/_publication/{publication}/{path:.*}").to(versions))
.service(web::resource("/_compare/{date}/{compare_date}").to(versions))
.service(
web::resource("/_compare/{date}/{compare_date}/{path:.*}").to(versions),
)
.service(web::resource("/_date/{date}").to(versions))
.service(web::resource("/_date/{date}/{path:.*}").to(versions))
.service(web::resource("/{path:.*}").to(versions))
.service(web::resource("").to(versions)),
Expand Down

0 comments on commit 8c40d26

Please sign in to comment.