Use updated generic conflict API method
This commit is contained in:
parent
97ed307921
commit
52b314e35e
2 changed files with 5 additions and 3 deletions
|
|
@ -145,7 +145,8 @@ const CharacterGrid = (props: Props) => {
|
|||
async function resolveConflict() {
|
||||
if (incoming && conflicts.length > 0) {
|
||||
await api
|
||||
.resolveCharacterConflict({
|
||||
.resolveConflict({
|
||||
object: 'characters',
|
||||
incoming: incoming.id,
|
||||
conflicting: conflicts.map((c) => c.id),
|
||||
position: position,
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ class Api {
|
|||
})
|
||||
}
|
||||
|
||||
resolveCharacterConflict({ incoming, conflicting, position, params }: {
|
||||
resolveConflict({ object, incoming, conflicting, position, params }: {
|
||||
object: 'characters' | 'weapons'
|
||||
incoming: string
|
||||
conflicting: string[]
|
||||
position: number,
|
||||
|
|
@ -90,7 +91,7 @@ class Api {
|
|||
position: position,
|
||||
},
|
||||
}
|
||||
const resourceUrl = `${this.url}/characters/resolve`
|
||||
const resourceUrl = `${this.url}/${object}/resolve`
|
||||
return axios.post(resourceUrl, body, { headers: params })
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue