Commit d6c6fda0 authored by Marcos Spessatto Defendi's avatar Marcos Spessatto Defendi Committed by Guilherme Gazzo
Browse files

[FIX] Fix next agent wrong param (#63)

parent 1c3fdf42
......@@ -38,7 +38,7 @@ export default class ApiLivechat extends ApiBase {
}
async deleteVisitor () { return (await this.del(`livechat/visitor/${this.credentials.token}`)).visitor}
async updateVisitorStatus(status: string) { return (await this.post(`livechat/visitor.status`, { token: this.credentials.token, status })).status }
async nextAgent (department?: any) { return (await this.get(`livechat/agent.next/${this.credentials.token}`, department)).agent }
async nextAgent (department?: any) { return (await this.get(`livechat/agent.next/${this.credentials.token}`, { department })).agent }
async agent ({ rid }: any) { return (await this.get(`livechat/agent.info/${rid}/${this.credentials.token}`)).agent }
sendMessage (message: INewLivechatMessageAPI) { return (this.post('livechat/message', { ...message, token: this.credentials.token }, false)) }
editMessage (id: string, message: INewLivechatMessageAPI) { return (this.put(`livechat/message/${id}`, message, false)) }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment