try to save data while onResponse
This commit is contained in:
@@ -418,16 +418,21 @@ class CommandorPage {
|
||||
}
|
||||
|
||||
async onResponse(response) {
|
||||
// let rex = new RegExp(REGEX_RDV_URL)
|
||||
// log("onResponse with url:" + response.url())
|
||||
// if (rex.test(response.url())) {
|
||||
// log("rdv url found:" + response.url())
|
||||
// await this.push_message_to_db(PublishType.SUCCESS, response.url())
|
||||
// }
|
||||
let rex = new RegExp(REGEX_RDV_URL)
|
||||
log("onResponse with url:" + response.url())
|
||||
// log("onResponse with url:" + response.body())
|
||||
if (rex.test(response.url())) {
|
||||
log("rdv url found:" + response.url())
|
||||
await this.push_message_to_db(PublishType.SUCCESS, response.url())
|
||||
}
|
||||
}
|
||||
|
||||
async push_message_to_queue(publishType) {
|
||||
let url = this.page.url();
|
||||
await this.push_message_to_db(publishType, url)
|
||||
}
|
||||
|
||||
async push_message_to_db(publishType, url) {
|
||||
let splitedUrl = url.split("/");
|
||||
let id = splitedUrl[splitedUrl.length - 1];
|
||||
if (url === "https://rendezvousparis.hermes.com/client/welcome") {
|
||||
|
||||
Reference in New Issue
Block a user