Compare commits

..

No commits in common. "main" and "v0.4.1" have entirely different histories.
main ... v0.4.1

6 changed files with 472 additions and 522 deletions

View file

@ -18,5 +18,4 @@ repos:
name: ui/menu lint+fmt
language: system
files: ^ui/menu/
pass_filenames: false
entry: npm run --prefix ui/menu pc
entry: sh -c "npm run --prefix ui/menu pc"

View file

@ -2,17 +2,6 @@
All notable changes to this project will be documented in this file.
## [0.4.2] - 2023-07-22
### Bug Fixes
- Container entrypoint
- Website version ordering
### Miscellaneous Tasks
- Fix npm pre-commit hook
## [0.4.1] - 2023-04-05
### Bug Fixes

958
Cargo.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,6 @@
[package]
name = "talon"
version = "0.4.2"
version = "0.4.1"
edition = "2021"
authors = ["ThetaDev <t.testboy@gmail.com>"]
license = "MIT"

View file

@ -41,8 +41,7 @@ for arch in "${ARCHITECTURES[@]}"; do
# Finalize container
buildah umount "$container"
# entrypoint syntax: see issue https://github.com/containers/buildah/issues/1768
buildah config --entrypoint '["/talon"]' --cmd "run -d /data" --arch "$arch" --port 3000 --author "ThetaDev" "$container"
buildah config --entrypoint "/talon" --cmd "run -d /data" --arch "$arch" --port 3000 --author "ThetaDev" "$container"
buildah commit "$container" "$IMAGE:$arch-$TAG"
buildah manifest add "$REGISTRY/$IMAGE:$TAG" "$IMAGE:$arch-$TAG"

View file

@ -300,17 +300,18 @@ impl TalonApi {
subdomain: Path<String>,
) -> Result<Response<Json<Vec<Version>>>> {
let website = talon.db.get_website(&subdomain)?;
let mut versions = talon
talon
.db
.get_website_versions(&subdomain)
.map(|r| r.map(Version::from))
.collect::<Result<Vec<_>, _>>()?;
versions.sort_by_key(|v| v.id);
Ok(Response::new(Json(versions)).header(
header::LAST_MODIFIED,
httpdate::fmt_http_date(website.updated_at.into()),
))
.collect::<Result<Vec<_>, _>>()
.map(|data| {
Response::new(Json(data)).header(
header::LAST_MODIFIED,
httpdate::fmt_http_date(website.updated_at.into()),
)
})
.map_err(Error::from)
}
/// Get version