Skip to content

Commit

Permalink
Merge pull request #49 from rslvn/develop
Browse files Browse the repository at this point in the history
rollback firebase upgrade
  • Loading branch information
rslvn authored Nov 28, 2020
2 parents 9f8834f + 5925c04 commit 4288cb2
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 65 deletions.
3 changes: 2 additions & 1 deletion src/components/form/SetEmailPasswordForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,8 @@ export default class SetPasswordForm extends Vue {
confirmedPassword = '';
get description () {
return this.email ? this.$t('provider.linkPasswordProvider.passwordForm.description', { email: this.email })
return this.email
? this.$t('provider.linkPasswordProvider.passwordForm.description', { email: this.email })
: this.$t('provider.linkPasswordProvider.passwordForm.descriptionNoEmail')
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/image/upload/SingleValidatedImageUpload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<script lang="ts">
import { Component, Prop, Ref, Vue, Watch } from 'nuxt-property-decorator'
import { ValidationProvider } from 'vee-validate'
import firebase from 'firebase'
import { ValidationResult } from 'vee-validate/dist/types/types'
import { Image } from 'types-module'
import { storage, TaskEvent, TaskState } from '~/plugins/fire-init-plugin'
Expand Down Expand Up @@ -83,7 +84,7 @@ export default class SingleFileUploadWithValidation extends Vue {
this.handleFireStorageError,
() => {
return this.uploadTask?.snapshot.ref.getDownloadURL()
.then((downloadURL) => {
.then((downloadURL:string) => {
const image: Image = {
name: this.fileName,
src: downloadURL,
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"cropperjs": "^1.5.9",
"debounce": "^1.2.0",
"dotenv": "^8.2.0",
"firebase": "^8.1.1",
"firebase": "^7.15.5",
"firebase-admin": "^9.4.1",
"handlers-module": "file:../functions/modules/handlers-module",
"http-status-codes": "^2.1.4",
Expand Down
11 changes: 0 additions & 11 deletions src/server/sitemap.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
import express, { Router } from 'express'
import { sitemapHandler } from 'handlers-module'

// const staticRoutes = [
// Routes.HOME.path,
// Routes.TERMS.path,
// Routes.PRIVACY_POLICY.path,
// Routes.REGISTER.path,
// Routes.LOGIN.path,
// Routes.CROP.path,
// Routes.LIGHT_BOX.path,
// Routes.IMAGES.path
// ]

const app = express()
app.disable('x-powered-by')

Expand Down
18 changes: 10 additions & 8 deletions src/service/firebase/firebase-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@ import { auth } from '~/plugins/fire-init-plugin'
import { DefaultProfilePhoto } from '~/types'

export const getProviderData = (userInfo: UserInfo|null|undefined): ProviderData|null => {
return userInfo ? {
providerType: userInfo.providerId as ProviderType,
displayName: userInfo.displayName,
email: userInfo.email,
phoneNumber: userInfo.phoneNumber,
photoURL: userInfo.photoURL,
uid: userInfo.uid
} : null
return userInfo
? {
providerType: userInfo.providerId as ProviderType,
displayName: userInfo.displayName,
email: userInfo.email,
phoneNumber: userInfo.phoneNumber,
photoURL: userInfo.photoURL,
uid: userInfo.uid
}
: null
}

export const getAuthUser = (firebaseUser: User): AuthUser => {
Expand Down
3 changes: 2 additions & 1 deletion src/service/global-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ import { QueryParameters, Routes, RouteType } from '../types'
const timestampFormat: string = 'MM/DD/YYYY HH:mm:ss.SSS'
const slugDelimiter = '-'

export const dashAllRegex = new RegExp('-', 'g')
export const dashAllRegex = /-/g
// new RegExp('-', 'g')

export const generateUuid = () => {
return uuidv4().replace(dashAllRegex, '')
Expand Down
1 change: 1 addition & 0 deletions src/service/seo-service.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Vue } from 'nuxt-property-decorator'
import { DefaultMeta, PageMeta, RouteType } from '~/types'

const getHeadTitle = (routeType: RouteType, vue: Vue) => {
Expand Down
7 changes: 7 additions & 0 deletions src/shim-ts.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
declare namespace Express {
export interface Request {
user: any;
nsSessionId: string;
nsRequestId: string;
}
}
5 changes: 5 additions & 0 deletions src/shims-vue.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
declare module '*.vue' {
// @ts-ignore
import Vue from 'vue'
export default Vue
}
42 changes: 0 additions & 42 deletions src/ts-shim.d.ts

This file was deleted.

1 change: 1 addition & 0 deletions src/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"nuxt-i18n",
"cookie-universal-nuxt",
"firebase",
"firebase/app",
"nuxt-property-decorator",
"types-module",
"handlers-module"
Expand Down

0 comments on commit 4288cb2

Please sign in to comment.