Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: resolve to _api/versions requests without trailing / #52

Merged
merged 4 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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