-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: limit requestedChangesUser in Listings response (#3921)
* feat: connect up requsted changes user properly * fix: limit requestedChangesUser in Listings response #3889 * fix: update api service unit tests #3889 * fix: add details view unit test #3889 * fix: send id and name #3889 * fix: correct inport statement * fix: addressing comments #3889 * fix: cleanup swagger changes #3889 * fix: add missing return statement #3889 --------- Co-authored-by: Eric McGarry <[email protected]>
- Loading branch information
1 parent
42d56e0
commit ef71350
Showing
9 changed files
with
184 additions
and
10 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
api/prisma/migrations/06_requested_user_updates/migration.sql
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- AddForeignKey | ||
ALTER TABLE "listings" ADD CONSTRAINT "listings_requested_changes_user_id_fkey" FOREIGN KEY ("requested_changes_user_id") REFERENCES "user_accounts"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { IdDTO } from '../dtos/shared/id.dto'; | ||
import { User } from '../dtos/users/user.dto'; | ||
|
||
/* | ||
This maps a user that has requested changes on a listing to a limited IdDTO | ||
This is used by the partner site front end | ||
*/ | ||
export function requestedChangesUserMapper(user: User): IdDTO { | ||
return { | ||
id: user?.id, | ||
name: | ||
user?.firstName && user?.lastName | ||
? user?.firstName + ' ' + user?.lastName | ||
: undefined, | ||
}; | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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