add password protected pastes
All checks were successful
Build and Deploy Website / build (push) Successful in 4m27s

This commit is contained in:
2026-02-28 22:50:25 -08:00
parent e8fdbaba84
commit fb7decc608
6 changed files with 140 additions and 15 deletions

View File

@@ -10,12 +10,14 @@ import (
var ErrNotFound = errors.New("paste not found")
type Paste struct {
ID string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Language string `json:"language"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt *time.Time `json:"expires_at"`
ID string `json:"id"`
Title string `json:"title"`
Content string `json:"content"`
Language string `json:"language"`
CreatedAt time.Time `json:"created_at"`
ExpiresAt *time.Time `json:"expires_at"`
PasswordHash string `json:"-"`
Protected bool `json:"protected"`
}
type Store struct {