Fix rename in closet (#80)
This commit is contained in:
parent
0105c6b016
commit
68343b0a31
@ -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
|
||||||
|
@ -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' }
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user