Skip to content

Create paste api - #75

Merged
evanugarte merged 10 commits into
SCE-Development:devfrom
tylerhwang333-glitch:create-paste-api
Aug 21, 2026
Merged

Create paste api#75
evanugarte merged 10 commits into
SCE-Development:devfrom
tylerhwang333-glitch:create-paste-api

Conversation

@tylerhwang333-glitch

@tylerhwang333-glitch tylerhwang333-glitch commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

modules/sqlite_helpers.py

  • Added two new functions:
    • insert_text_paste(sqlite_file), inserts a default row into pastes, returns the new id (lastrowid), or None on error.
    • paste_exists(sqlite_file, paste_id), checks if a given id exists in pastes.
      server.py
  • Added imports: PlainTextResponse, pathlib.Path, os.
    id, writes the text to pastes/ on disk, returns {"id": paste_id}.
  • Added GET /paste/view/{paste_id}: reads pastes/<paste_id> from disk and returns it as plain text, 404 if missing.

@evanugarte
evanugarte merged commit 75dcf1a into SCE-Development:dev Aug 21, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants