mirror of
				https://github.com/mickael-kerjean/filestash.git
				synced 2025-10-31 10:07:15 +08:00 
			
		
		
		
	feature (notification): inform user of anything happenning
This commit is contained in:
		| @ -23,9 +23,9 @@ export function http_get(url, type = 'json'){ | ||||
|                     } | ||||
|                 }else{ | ||||
|                     if(navigator.onLine === false){ | ||||
|                         err({status: xhr.status, code: "CONNECTION_LOST", message: 'Connection Lost'}); | ||||
|                         err({status: xhr.status, code: "CONNECTION_LOST", message: 'Ooups! Looks like your internet has gone away'}); | ||||
|                     }else{ | ||||
|                         err({status: xhr.status, message: xhr.responseText || 'Oups something went wrong'}); | ||||
|                         err({status: xhr.status, message: xhr.responseText || 'Oups! Something went wrong'}); | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
| @ -35,7 +35,6 @@ export function http_get(url, type = 'json'){ | ||||
|     }); | ||||
| } | ||||
|  | ||||
|  | ||||
| export function http_post(url, data, type = 'json'){ | ||||
|     return new Promise((done, err) => { | ||||
|         var xhr = new XMLHttpRequest(); | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Mickael KERJEAN
					Mickael KERJEAN