fix: batch tag queries, inline edit, delete response, SPA catch-all, link glyph
- Fix N+1 tag query in List() with batched IN clause
- Add inline body editing in web detail pane (dblclick or e key)
- Delete API returns {result: "soft"|"hard"} with 200 instead of 204
- SPA handler serves index.html for all extensionless paths
- Link glyph changed from emoji 🔗 to unicode ↗ for terminal alignment
- Capture bar contrast and hover glow increased
- Comment on load-bearing "--" in root.go
This commit is contained in:
@@ -235,16 +235,25 @@ func TestDeleteEntity_SoftThenHard(t *testing.T) {
|
||||
// Soft delete
|
||||
req, _ := http.NewRequest("DELETE", srv.URL+"/api/entities/"+created.ID, nil)
|
||||
resp, _ := http.DefaultClient.Do(req)
|
||||
var delResp DeleteResponse
|
||||
json.NewDecoder(resp.Body).Decode(&delResp)
|
||||
resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusNoContent {
|
||||
t.Fatalf("soft delete: expected 204, got %d", resp.StatusCode)
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
t.Fatalf("soft delete: expected 200, got %d", resp.StatusCode)
|
||||
}
|
||||
if delResp.Result != "soft" {
|
||||
t.Fatalf("soft delete: expected result 'soft', got %q", delResp.Result)
|
||||
}
|
||||
|
||||
// Hard delete
|
||||
resp, _ = http.DefaultClient.Do(req)
|
||||
json.NewDecoder(resp.Body).Decode(&delResp)
|
||||
resp.Body.Close()
|
||||
if resp.StatusCode != http.StatusNoContent {
|
||||
t.Fatalf("hard delete: expected 204, got %d", resp.StatusCode)
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
t.Fatalf("hard delete: expected 200, got %d", resp.StatusCode)
|
||||
}
|
||||
if delResp.Result != "hard" {
|
||||
t.Fatalf("hard delete: expected result 'hard', got %q", delResp.Result)
|
||||
}
|
||||
|
||||
// Gone
|
||||
|
||||
Reference in New Issue
Block a user