From b23c8a2dbd07956464f94f786520575d6a1422d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Sun, 18 Aug 2024 17:51:24 +0200 Subject: [PATCH] Add missing file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- package.json | 2 +- src/normalizers/group-member.ts | 12 ++++++++++++ yarn.lock | 10 +++++----- 3 files changed, 18 insertions(+), 6 deletions(-) create mode 100644 src/normalizers/group-member.ts diff --git a/package.json b/package.json index 675a3b99d..3b8e5dcee 100644 --- a/package.json +++ b/package.json @@ -133,7 +133,7 @@ "multiselect-react-dropdown": "^2.0.25", "object-to-formdata": "^4.5.1", "path-browserify": "^1.0.1", - "pl-api": "^0.0.2", + "pl-api": "^0.0.4", "postcss": "^8.4.29", "process": "^0.11.10", "punycode": "^2.1.1", diff --git a/src/normalizers/group-member.ts b/src/normalizers/group-member.ts new file mode 100644 index 000000000..5a2e3ea85 --- /dev/null +++ b/src/normalizers/group-member.ts @@ -0,0 +1,12 @@ +import { normalizeAccount } from './account'; + +import type { GroupMember as BaseGroupMember } from 'pl-api'; + +const normalizeGroupMember = (groupMember: BaseGroupMember) => ({ + ...groupMember, + account: normalizeAccount(groupMember.account), +}); + +type GroupMember = ReturnType; + +export { normalizeGroupMember, type GroupMember }; diff --git a/yarn.lock b/yarn.lock index 9cc81654c..7cd2f972c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8390,14 +8390,14 @@ pkg-types@^1.0.3: mlly "^1.2.0" pathe "^1.1.0" -pl-api@^0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-0.0.2.tgz#b717ed27e0f8ba716457728d0472aba30b7461cf" - integrity sha512-TGHH6StmkwVBs0PZk4zB1N66VRncANtGgDbhoc+9ca+HIRYux7HuGsVXyoOY9xKrNPRu4WYk+AeaNYTMcnuCIQ== +pl-api@^0.0.4: + version "0.0.4" + resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-0.0.4.tgz#416f4ed469a10b2c39db01ab63ca4839a2a9b024" + integrity sha512-NgNajifSHBju6D98KqjYVl/ztJw983h+Sw58zz8BLrhltIOk6ssOwmMeIk4p3lZ4+8NUOnnG9wgz6/ZwHjHn8g== dependencies: blurhash "^2.0.5" http-link-header "^1.1.3" - lodash "^4.17.21" + lodash.pick "^4.4.0" object-to-formdata "^4.5.1" query-string "^9.1.0" semver "^7.6.3"