summaryrefslogtreecommitdiff
path: root/srv
diff options
context:
space:
mode:
authorBrian Picciano <mediocregopher@gmail.com>2022-05-21 11:40:13 -0600
committerBrian Picciano <mediocregopher@gmail.com>2022-05-21 11:40:13 -0600
commitbdd1f01605f48dd002836221b0eac03874038f5d (patch)
tree15f29dff699646b5b55b8593e09c0ebd0f8d8d14 /srv
parent01424c7dab5fe42a9f00e3c9bb285924e42136fc (diff)
Fix srv binaries
Diffstat (limited to 'srv')
-rw-r--r--srv/default.nix2
-rw-r--r--srv/src/cmd/import-posts/main.go4
2 files changed, 3 insertions, 3 deletions
diff --git a/srv/default.nix b/srv/default.nix
index 2f7d58c..a1ce925 100644
--- a/srv/default.nix
+++ b/srv/default.nix
@@ -37,7 +37,7 @@
pname = "mediocre-blog-srv";
version = "dev";
src = ./src;
- vendorSha256 = "1s5jhis1a2y7m50k29ap7kd0h4bgc3dzy1f9dqf5jrz8n27f3i87";
+ vendorSha256 = "sha256-C3hyPDO+6oTUeoGP/ZzBn5Y4V/q1jI12BwkR9NADHn0=";
# disable tests
checkPhase = '''';
diff --git a/srv/src/cmd/import-posts/main.go b/srv/src/cmd/import-posts/main.go
index b2dc889..4523392 100644
--- a/srv/src/cmd/import-posts/main.go
+++ b/srv/src/cmd/import-posts/main.go
@@ -76,7 +76,7 @@ func importPost(postStore post.Store, path string) (post.StoredPost, error) {
Body: string(body),
}
- if err := postStore.Set(p, publishedAt); err != nil {
+ if _, err := postStore.Set(p, publishedAt); err != nil {
return post.StoredPost{}, fmt.Errorf("storing post id %q: %w", p.ID, err)
}
@@ -89,7 +89,7 @@ func importPost(postStore post.Store, path string) (post.StoredPost, error) {
// as a hack, we store the post again with the updated date as now. This
// will update the LastUpdatedAt field in the Store.
- if err := postStore.Set(p, lastUpdatedAt); err != nil {
+ if _, err := postStore.Set(p, lastUpdatedAt); err != nil {
return post.StoredPost{}, fmt.Errorf("updating post id %q: %w", p.ID, err)
}
}