[PR #486] [MERGED] fix: remove CreateNewID usage from api handlers #612

Closed
opened 2026-02-25 23:34:54 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-shiori/shiori/pull/486
Author: @fmartingr
Created: 10/4/2022
Status: Merged
Merged: 10/9/2022
Merged by: @fmartingr

Base: masterHead: fix/psql-archive-id


📝 Commits (1)

  • b416816 workaround: remove createnewid from handler api

📊 Changes

1 file changed (+11 additions, -14 deletions)

View changed files

📝 internal/webserver/handler-api.go (+11 -14)

📄 Description

Using database.CreateNewID is very confusing. We should let the database engines create IDs directly instead of retrieving the last element in the sequence.

This is a first draft step that replaces the flow in the API, saving the bookmark first and then creating the archive with the ID provided by the database.

Requires #484

FIxes #282

Relates to #271


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-shiori/shiori/pull/486 **Author:** [@fmartingr](https://github.com/fmartingr) **Created:** 10/4/2022 **Status:** ✅ Merged **Merged:** 10/9/2022 **Merged by:** [@fmartingr](https://github.com/fmartingr) **Base:** `master` ← **Head:** `fix/psql-archive-id` --- ### 📝 Commits (1) - [`b416816`](https://github.com/go-shiori/shiori/commit/b416816638ae6e91d2a54612f6dc57d41a98ec7c) workaround: remove createnewid from handler api ### 📊 Changes **1 file changed** (+11 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `internal/webserver/handler-api.go` (+11 -14) </details> ### 📄 Description Using `database.CreateNewID` is very confusing. We should let the database engines create IDs directly instead of retrieving the last element in the sequence. This is a first draft step that replaces the flow in the API, saving the bookmark first and then creating the archive with the ID provided by the database. Requires #484 FIxes #282 Relates to #271 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 23:34:54 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/shiori#612
No description provided.