Update: Working on FeedLand API, making change in how users table works

Open
#32 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
15/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
mysql
Domain
api, database

Research direction

The issue names database.setUserPrefs but no source file or test. Start by locating that entry point and its callers, including feedlandHome and the markTwain prototype; done would require a maintainer-defined regression check that omitted preferences do not overwrite existing user values.

Written by the indexing model from the issue text.

Description

Hopefully there will be no breakage from this change, which I'm making very carefully.

First a bit of background.

  1. I'm working on a REST API for FeedLand, so we can build other UIs for the data in a feedland instance.
  2. I have a prototype app whose codename is markTwain. You will hear me refer to it from time to time.
  3. markTwain doesn't do everything feedlandHome does (that's the app that forms the UI for FeedLand as you use it now).
  4. So when you assign to the user's prefs, we don't have values for all the things we keep track of for users.
  5. As-written database.setUserPrefs will set the values of all columns, even if they weren't specified by the caller.
  6. This isn't a problem for feedlandHome because it always sends all the values.
  7. But it is a problem for markTwain. So I changed the functionality slightly so that if we don't have a value we don't change it to NULL which is what MySQL would substitute. (I investigate this thoroughly, hopefully.)

markTwain is a placeholder for "all future apps." I could have made MT supply all the values it doesn't do anything with, but this isn't very futuristic. I want to lay a good clean foundation here.

This change should not affect current FeedLand installations, but we should keep an eye out for problems.

I'll post a note in this thread when the changes are deployed.

Dominant language
HTML
Stars
11
Forks
4
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from scripting/feedlandInstall

All issues in scripting/feedlandInstall

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.