From: Dessalines Date: Mon, 4 Jan 2021 19:09:53 +0000 (-0500) Subject: Trying to fix save user settings. X-Git-Url: http://these/git/%7B%60%24%7BwebArchiveUrl%7D/%22%7B%7D/%24%7B%60data:application/%22https:/hacktivis.me/%7BpictrsAvatarThumbnail%28this.props.site.site.icon%29%7D?a=commitdiff_plain;h=61c6f3310375c93c4d0f927af6562bab7af4589e;p=lemmy.git Trying to fix save user settings. --- diff --git a/api_tests/package.json b/api_tests/package.json index 13c19496..6a9a4d6d 100644 --- a/api_tests/package.json +++ b/api_tests/package.json @@ -14,7 +14,7 @@ "devDependencies": { "@types/jest": "^26.0.19", "jest": "^26.6.3", - "lemmy-js-client": "1.0.17-beta3", + "lemmy-js-client": "1.0.17-beta6", "node-fetch": "^2.6.1", "ts-jest": "^26.4.4", "prettier": "^2.1.2", diff --git a/api_tests/src/shared.ts b/api_tests/src/shared.ts index 8e6d5334..20787038 100644 --- a/api_tests/src/shared.ts +++ b/api_tests/src/shared.ts @@ -551,8 +551,8 @@ export async function saveUserSettingsBio( let form: SaveUserSettings = { show_nsfw: true, theme: 'darkly', - default_sort_type: SortType.Active, - default_listing_type: ListingType.All, + default_sort_type: Object.keys(SortType).indexOf(SortType.Active), + default_listing_type: Object.keys(ListingType).indexOf(ListingType.All), lang: 'en', show_avatars: true, send_notifications_to_email: false, diff --git a/api_tests/src/user.spec.ts b/api_tests/src/user.spec.ts index 7886f8eb..4352aa42 100644 --- a/api_tests/src/user.spec.ts +++ b/api_tests/src/user.spec.ts @@ -44,8 +44,8 @@ test('Set some user settings, check that they are federated', async () => { let form: SaveUserSettings = { show_nsfw: false, theme: '', - default_sort_type: SortType.Hot, - default_listing_type: ListingType.All, + default_sort_type: Object.keys(SortType).indexOf(SortType.Hot), + default_listing_type: Object.keys(ListingType).indexOf(ListingType.All), lang: '', avatar, banner, diff --git a/api_tests/yarn.lock b/api_tests/yarn.lock index 3a59e673..aacf1874 100644 --- a/api_tests/yarn.lock +++ b/api_tests/yarn.lock @@ -3210,10 +3210,10 @@ language-tags@^1.0.5: dependencies: language-subtag-registry "~0.3.2" -lemmy-js-client@1.0.17-beta3: - version "1.0.17-beta3" - resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-1.0.17-beta3.tgz#ad53f3fd57e7656732f0ccde4f6b22242d77fd9b" - integrity sha512-0GIStZtmkCZmKk12faEusYyEIdDhhnSZ52HIu1b8rPhl68OrxVYBRbl2DQC6Ue7LFR2yMsa1q6Mp1UrTCTssRA== +lemmy-js-client@1.0.17-beta6: + version "1.0.17-beta6" + resolved "https://registry.yarnpkg.com/lemmy-js-client/-/lemmy-js-client-1.0.17-beta6.tgz#afe1e1da13172a161c4d976b1ee58fe81eb22829" + integrity sha512-+oX7J7wht8nH4a5NQngK1GNner3TDv6ZOhQQVI5KcK7vynVVIcgveC5KBJArHBAl5acXpLs3Khmx0ZEb+sErJA== leven@^3.1.0: version "3.1.0"