Fix can not fetch unsplash pictures (#1518)

This commit is contained in:
Ran Luo 2019-10-24 08:37:19 +08:00 committed by GitHub
parent ca0905dc60
commit f1f048f53d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 5 deletions

View File

@ -12,7 +12,7 @@ class ImageSelector extends BaseFloat {
constructor (muya, options) { constructor (muya, options) {
const name = 'ag-image-selector' const name = 'ag-image-selector'
const { applicationId, secret } = options const { accessKey } = options
options = Object.assign(options, { options = Object.assign(options, {
placement: 'bottom-center', placement: 'bottom-center',
modifiers: { modifiers: {
@ -27,8 +27,7 @@ class ImageSelector extends BaseFloat {
this.oldVnode = null this.oldVnode = null
this.imageInfo = null this.imageInfo = null
this.unsplash = new Unsplash({ this.unsplash = new Unsplash({
applicationId, accessKey
secret
}) })
this.photoList = [] this.photoList = []
this.loading = false this.loading = false

View File

@ -452,8 +452,7 @@ export default {
Muya.use(EmojiPicker) Muya.use(EmojiPicker)
Muya.use(ImagePathPicker) Muya.use(ImagePathPicker)
Muya.use(ImageSelector, { Muya.use(ImageSelector, {
applicationId: process.env.UNSPLASH_ACCESS_KEY, accessKey: process.env.UNSPLASH_ACCESS_KEY,
secret: process.env.UNSPLASH_SECRET_KEY,
photoCreatorClick: this.photoCreatorClick photoCreatorClick: this.photoCreatorClick
}) })
Muya.use(Transformer) Muya.use(Transformer)