delete bannerUrl from user type
This commit is contained in:
parent
17d0fb7da6
commit
fb0a09664e
|
@ -12,7 +12,6 @@ export type User = {
|
||||||
|
|
||||||
// For their user page
|
// For their user page
|
||||||
bio?: string
|
bio?: string
|
||||||
bannerUrl?: string
|
|
||||||
website?: string
|
website?: string
|
||||||
twitterHandle?: string
|
twitterHandle?: string
|
||||||
discordHandle?: string
|
discordHandle?: string
|
||||||
|
|
|
@ -27,7 +27,7 @@ service cloud.firestore {
|
||||||
allow read;
|
allow read;
|
||||||
allow update: if userId == request.auth.uid
|
allow update: if userId == request.auth.uid
|
||||||
&& request.resource.data.diff(resource.data).affectedKeys()
|
&& 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
|
// User referral rules
|
||||||
allow update: if userId == request.auth.uid
|
allow update: if userId == request.auth.uid
|
||||||
&& request.resource.data.diff(resource.data).affectedKeys()
|
&& request.resource.data.diff(resource.data).affectedKeys()
|
||||||
|
|
|
@ -192,7 +192,6 @@ export type LiteUser = {
|
||||||
avatarUrl?: string
|
avatarUrl?: string
|
||||||
|
|
||||||
bio?: string
|
bio?: string
|
||||||
bannerUrl?: string
|
|
||||||
website?: string
|
website?: string
|
||||||
twitterHandle?: string
|
twitterHandle?: string
|
||||||
discordHandle?: string
|
discordHandle?: string
|
||||||
|
@ -223,7 +222,6 @@ export function toLiteUser(user: User): LiteUser {
|
||||||
username,
|
username,
|
||||||
avatarUrl,
|
avatarUrl,
|
||||||
bio,
|
bio,
|
||||||
bannerUrl,
|
|
||||||
website,
|
website,
|
||||||
twitterHandle,
|
twitterHandle,
|
||||||
discordHandle,
|
discordHandle,
|
||||||
|
@ -241,7 +239,6 @@ export function toLiteUser(user: User): LiteUser {
|
||||||
url: `https://${ENV_CONFIG.domain}/${username}`,
|
url: `https://${ENV_CONFIG.domain}/${username}`,
|
||||||
avatarUrl,
|
avatarUrl,
|
||||||
bio,
|
bio,
|
||||||
bannerUrl,
|
|
||||||
website,
|
website,
|
||||||
twitterHandle,
|
twitterHandle,
|
||||||
discordHandle,
|
discordHandle,
|
||||||
|
|
|
@ -28,7 +28,7 @@ export const getServerSideProps = redirectIfLoggedOut('/', async (_, creds) => {
|
||||||
|
|
||||||
function EditUserField(props: {
|
function EditUserField(props: {
|
||||||
user: User
|
user: User
|
||||||
field: 'bio' | 'website' | 'bannerUrl' | 'twitterHandle' | 'discordHandle'
|
field: 'bio' | 'website' | 'twitterHandle' | 'discordHandle'
|
||||||
label: string
|
label: string
|
||||||
}) {
|
}) {
|
||||||
const { user, field, label } = props
|
const { user, field, label } = props
|
||||||
|
|
Loading…
Reference in New Issue
Block a user