This commit is contained in:
github-actions[bot] 2022-10-10 20:52:00 +00:00 committed by GitHub
commit fb31b621b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 2 additions and 6 deletions

View File

@ -12,7 +12,6 @@ export type User = {
// For their user page
bio?: string
bannerUrl?: string
website?: string
twitterHandle?: string
discordHandle?: string

View File

@ -27,7 +27,7 @@ service cloud.firestore {
allow read;
allow update: if userId == request.auth.uid
&& request.resource.data.diff(resource.data).affectedKeys()
.hasOnly(['bio', 'bannerUrl', 'website', 'twitterHandle', 'discordHandle', 'followedCategories', 'lastPingTime','shouldShowWelcome', 'hasSeenContractFollowModal', 'homeSections']);
.hasOnly(['bio', 'website', 'twitterHandle', 'discordHandle', 'followedCategories', 'lastPingTime','shouldShowWelcome', 'hasSeenContractFollowModal', 'homeSections']);
// User referral rules
allow update: if userId == request.auth.uid
&& request.resource.data.diff(resource.data).affectedKeys()

View File

@ -192,7 +192,6 @@ export type LiteUser = {
avatarUrl?: string
bio?: string
bannerUrl?: string
website?: string
twitterHandle?: string
discordHandle?: string
@ -223,7 +222,6 @@ export function toLiteUser(user: User): LiteUser {
username,
avatarUrl,
bio,
bannerUrl,
website,
twitterHandle,
discordHandle,
@ -241,7 +239,6 @@ export function toLiteUser(user: User): LiteUser {
url: `https://${ENV_CONFIG.domain}/${username}`,
avatarUrl,
bio,
bannerUrl,
website,
twitterHandle,
discordHandle,

View File

@ -28,7 +28,7 @@ export const getServerSideProps = redirectIfLoggedOut('/', async (_, creds) => {
function EditUserField(props: {
user: User
field: 'bio' | 'website' | 'bannerUrl' | 'twitterHandle' | 'discordHandle'
field: 'bio' | 'website' | 'twitterHandle' | 'discordHandle'
label: string
}) {
const { user, field, label } = props