mirror of
https://github.com/stoatchat/javascript-client-sdk.git
synced 2026-07-20 20:16:06 -04:00
refactor: Session.edit => Session.rename
This commit is contained in:
@@ -50,11 +50,15 @@ export class Session {
|
||||
}
|
||||
|
||||
/**
|
||||
* Edit a session
|
||||
* @param data Changes
|
||||
* Rename a session
|
||||
* @param name New name
|
||||
*/
|
||||
async edit(data: DataEditSession) {
|
||||
await this.#collection.client.api.patch(`/auth/session/${this.id}`, data);
|
||||
async rename(name: string) {
|
||||
await this.#collection.client.api.patch(`/auth/session/${this.id}`, {
|
||||
friendly_name: name,
|
||||
});
|
||||
|
||||
this.#collection.updateUnderlyingObject(this.id, "name", name);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user