Fix rename in closet (#80)

This commit is contained in:
Asnxthaony 2019-07-07 09:40:30 +08:00 committed by Pig Fang
parent 0105c6b016
commit 68343b0a31
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ export default {
const { code, message } = await this.$http.post( const { code, message } = await this.$http.post(
`/user/closet/rename/${this.tid}`, `/user/closet/rename/${this.tid}`,
{ new_name: newTextureName } { name: newTextureName }
) )
if (code === 0) { if (code === 0) {
this.textureName = newTextureName this.textureName = newTextureName

View File

@ -62,7 +62,7 @@ test('rename texture', async () => {
expect(wrapper.find('.texture-name > span').text()).toBe('new-name (steve)') expect(wrapper.find('.texture-name > span').text()).toBe('new-name (steve)')
expect(Vue.prototype.$http.post).toBeCalledWith( expect(Vue.prototype.$http.post).toBeCalledWith(
'/user/closet/rename/1', '/user/closet/rename/1',
{ new_name: 'new-name' } { name: 'new-name' }
) )
}) })