Alert response if set searchhidden fails.
This commit is contained in:
		
							parent
							
								
									fbaa7843da
								
							
						
					
					
						commit
						cc8053f8fd
					
				
					 1 changed files with 11 additions and 2 deletions
				
			
		|  | @ -433,11 +433,20 @@ function set_searchhidden_form(event) | |||
|     const checkbox = event.target; | ||||
|     if (checkbox.checked) | ||||
|     { | ||||
|         api.photos.set_searchhidden(PHOTO_ID); | ||||
|         api.photos.set_searchhidden(PHOTO_ID, set_searchhidden_callback); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         api.photos.unset_searchhidden(PHOTO_ID); | ||||
|         api.photos.unset_searchhidden(PHOTO_ID, set_searchhidden_callback); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| function set_searchhidden_callback(response) | ||||
| { | ||||
|     if (response.meta.status !== 200) | ||||
|     { | ||||
|         alert(JSON.stringify(response)); | ||||
|         return; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue