Skip to content

Commit

Permalink
[core] Use new API to create a session
Browse files Browse the repository at this point in the history
  • Loading branch information
devlikepro committed Aug 27, 2024
1 parent 2d1859a commit d669dbe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ later:
How to log in - the instruction on WhatsApp site
</a>

When your ready - find `POST /api/session/start`, click on **Try it out**, then **Execute** a bit below.
When your ready - find `POST /api/sessions`, click on **Try it out**, then **Execute** a bit below.


The example payload:
Expand Down
4 changes: 2 additions & 2 deletions examples/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ docker run -it --rm --network=host -e WHATSAPP_HOOK_URL=http://localhost:5000/bo

2. Open Swagger API in the browser http://localhost:3000/
3. Start session and scan QR code in swagger
1. Find `POST /api/session/start` request press **Try it out** and
**Execute** it with `default` session name
1. Find `POST /api/sessions/` request press **Try it out** and **Execute** it
with `default` session name
2. Find `GET /api/screenshot` and execute it - it must show QR code
3. Scan QR code on your mobile WhatsApp application (that installed on your
phone)
Expand Down
3 changes: 2 additions & 1 deletion src/core/manager.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ export class SessionManagerCore extends SessionManager {
const session = this.session;
if (!session) {
throw new NotFoundException(
`We didn't find a session with name '${name}'. Please start it first by using POST /sessions/start request`,
`We didn't find a session with name '${name}'.
Please start it first by using POST /sessions/${name}/start request`,
);
}
return session;
Expand Down

0 comments on commit d669dbe

Please sign in to comment.