mirror of
https://github.com/zen-browser/rices.git
synced 2025-07-07 08:55:40 +02:00
- Changed create and update method. Headers+body instead of DTO
- Added token validation for `update` and `remove` operations to ensure it matches the record in the database. - Ensured `name` and `author` from headers in `update` are validated against the existing record. - Improved error handling for mismatched or missing tokens, returning appropriate HTTP status codes.
This commit is contained in:
parent
c8ce6e7637
commit
121ccadf57
8 changed files with 328 additions and 151 deletions
|
@ -2,10 +2,11 @@
|
|||
|
||||
CREATE TABLE rices (
|
||||
id UUID NOT NULL, -- Unique identifier
|
||||
slug VARCHAR(75) NOT NULL, -- Unique user-friendly identifier
|
||||
version VARCHAR(10) NOT NULL, -- Data version
|
||||
os VARCHAR(30) NOT NULL, -- Operating system
|
||||
slug VARCHAR(75) NOT NULL, -- Unique user-friendly identifier
|
||||
name VARCHAR(75) NOT NULL, -- Name of the rice
|
||||
author VARCHAR(100) NOT NULL, -- Name of the rice
|
||||
token UUID NOT NULL, -- Unique authorization token
|
||||
visits INTEGER DEFAULT 0 NOT NULL, -- Visit counter, initialized to 0
|
||||
level INTEGER DEFAULT 0 NOT NULL, -- Level: 0 (Public), 1 (Verified)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue