diff --git a/docs/openapi.yaml b/docs/openapi.yaml index bef27e4..27ce576 100644 --- a/docs/openapi.yaml +++ b/docs/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: WhatsApp API MultiDevice - version: 4.1.0 + version: 4.2.0 description: This API is used for sending whatsapp via API servers: - url: http://localhost:3000 @@ -36,6 +36,32 @@ paths: application/json: schema: $ref: '#/components/schemas/ErrorInternalServer' + /app/login-with-code: + get: + operationId: appLoginWithCode + tags: + - app + summary: Login with pairing code + parameters: + - name: phone + in: query + schema: + type: string + example: '628912344551' + description: Your phone number + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/LoginWithCodeResponse' + '500': + description: Internal Server Error + content: + application/json: + schema: + $ref: '#/components/schemas/ErrorInternalServer' /app/logout: get: operationId: appLogout @@ -1241,6 +1267,21 @@ components: device: type: string example: '628960561XXX.0:64@s.whatsapp.net' + LoginWithCodeResponse: + type: object + properties: + code: + type: string + example: SUCCESS + message: + type: string + example: Success + results: + type: object + properties: + pair_code: + type: string + example: ABCD-1234 LoginResponse: type: object properties: diff --git a/src/views/components/AppLogin.js b/src/views/components/AppLogin.js index cacb898..88848d5 100644 --- a/src/views/components/AppLogin.js +++ b/src/views/components/AppLogin.js @@ -43,7 +43,7 @@ export default {