(account?: any)
| 32 | } |
| 33 | |
| 34 | export function serializeAccount(account?: any): SerializedAccount { |
| 35 | const { |
| 36 | description, |
| 37 | homeUrl, |
| 38 | docsUrl, |
| 39 | logoUrl, |
| 40 | logoSquareUrl, |
| 41 | faviconUrl, |
| 42 | redirectDomain, |
| 43 | brandColor, |
| 44 | premium, |
| 45 | featurePreview, |
| 46 | googleAnalyticsId, |
| 47 | syncStatus, |
| 48 | id, |
| 49 | type, |
| 50 | name, |
| 51 | anonymizeUsers, |
| 52 | anonymize, |
| 53 | slackDomain, |
| 54 | discordDomain, |
| 55 | discordServerId, |
| 56 | chat, |
| 57 | communityUrl, |
| 58 | newChannelsConfig, |
| 59 | redirectDomainPropagate, |
| 60 | searchSettings, |
| 61 | } = account; |
| 62 | |
| 63 | const communityType = identifyCommunity(account); |
| 64 | const hasAuth = hasAuthFn(account); |
| 65 | const search: SerializedSearchSettings = tc(() => JSON.parse(searchSettings)); |
| 66 | |
| 67 | return { |
| 68 | description, |
| 69 | homeUrl, |
| 70 | docsUrl, |
| 71 | logoUrl, |
| 72 | logoSquareUrl, |
| 73 | faviconUrl, |
| 74 | redirectDomain, |
| 75 | brandColor, |
| 76 | premium, |
| 77 | featurePreview, |
| 78 | googleAnalyticsId, |
| 79 | syncStatus, |
| 80 | id, |
| 81 | type, |
| 82 | name, |
| 83 | communityType, |
| 84 | anonymizeUsers, |
| 85 | anonymize, |
| 86 | hasAuth, |
| 87 | slackDomain, |
| 88 | discordDomain, |
| 89 | discordServerId, |
| 90 | chat, |
| 91 | communityUrl, |
no test coverage detected