Repository navigation
Conversation
getUserProfilePseuds already built pseudsArray internally but joined it into a single ", "-separated string before returning, so callers had to parse it back apart to get individual pseuds. Return the array directly instead. Updates the User.pseuds type and regenerates the zod schemas. Fixes FujoWebDev#202
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
getUserProfilePseudsalready builtpseudsArrayby parsing eachdd.pseuds alink, but joined it into a single", "-separated string (PSEUD_SUFFIX) before returning — matching the// TODO: this should really be an arrayleft insrc/users/index.ts.src/users/getters.ts: returnpseudsArraydirectly; removed the now-unusedPSEUD_SUFFIXconstant.src/users/index.ts: removed the resolved TODO comment.types/entities.ts:User.pseudsis nowstring[].types/zod/generated/schemas.ts: regenerated vianpm run generate-schemas.tests/user.test.ts: updated theastolatfixture expectation to the array form.Fixes #202
Test plan
npm test— 120 passed, 5 skipped, 1 todo (full suite, including the regenerated-schema and updated-fixture checks)npx tsc --noEmit— 0 errorsgetters.tsreproduces the exact pre-fix string output against the mockedastolatfixturepseud/usernamepairs insrc/series/getters.ts,src/works/work-getters.ts, andsrc/works/chapter-getters.tsare an unrelated per-author field, already array-shaped, left untouched)🤖 Generated with Claude Code