SamTV12345 / PodFetch

A sleek and efficient podcast downloader.
https://samtv12345.github.io/PodFetch
Apache License 2.0
347 stars 25 forks source link

Cannot generate API key via UI #584

Closed matthewkdies closed 8 months ago

matthewkdies commented 8 months ago

Describe the bug

When trying to generate an API key through the UI, I get an error toast that displays as "Unknown". The underlying log generated is 2024-02-01T00:57:41 ❌ - Database error: Record not found.

Alternatively, I also cannot get the invite links from the "Copy URL" button when generating an admin user. Upon inspecting the button I also wasn't able to find any relevant link from it.

For what it's worth, I have basic authentication enabled.

Reproduction

Use SQLite docker-compose example, add basic auth, log in through web UI, and try to generate API key for logged in user.

System Info

Synology NAS running via Docker. My relevant compose file is below:

version: '3'
services:
  podfetch:
    image: samuel19982/podfetch:latest
    container_name: podfetch
    user: <my_uid>:<my_gid>
    ports:
      - <external_port>:8000
    volumes:
      - ./podcasts:/app/podcasts
      - ./db:/app/db
    environment:
      - POLLING_INTERVAL=60
      - SERVER_URL=http://localhost:8000
      - BASIC_AUTH=true
      - USERNAME=<my_username>
      - PASSWORD=<my_password>
    network_mode: <my_custom_network>
    restart: unless-stopped

Used Package Manager

npm

Validations

SamTV12345 commented 8 months ago

I added a better exception message. The admin user should be used mostly for administration purposes.

matthewkdies commented 8 months ago

I see, thank you -- the fix works great and I'm already off and running. I appreciate the help!