MOBILE-3556 Login: Send extra parameter on token.php check
The extra parameter can be used by Moodle to avoid throwing an error in server logs because other parameters e.g. username are not supplied.main
parent
1e59f786db
commit
25b1b68655
|
@ -641,7 +641,8 @@ export class CoreSitesProvider {
|
|||
* @return A promise to be resolved if the site exists.
|
||||
*/
|
||||
siteExists(siteUrl: string): Promise<void> {
|
||||
return this.http.post(siteUrl + '/login/token.php', {}).timeout(this.wsProvider.getRequestTimeout()).toPromise()
|
||||
return this.http.post(siteUrl + '/login/token.php', { appsitecheck: 1 }).
|
||||
timeout(this.wsProvider.getRequestTimeout()).toPromise()
|
||||
.catch(() => {
|
||||
// Default error messages are kinda bad, return our own message.
|
||||
return Promise.reject({error: this.translate.instant('core.cannotconnecttrouble')});
|
||||
|
|
Loading…
Reference in New Issue