Add /album/remove_thumbnail_photo endpoint.
This commit is contained in:
		
							parent
							
								
									da8dff6f85
								
							
						
					
					
						commit
						d6f155afbd
					
				
					 2 changed files with 15 additions and 0 deletions
				
			
		|  | @ -78,6 +78,13 @@ def post_album_remove_child(album_id): | ||||||
|     response = album.jsonify() |     response = album.jsonify() | ||||||
|     return jsonify.make_json_response(response) |     return jsonify.make_json_response(response) | ||||||
| 
 | 
 | ||||||
|  | @site.route('/album/<album_id>/remove_thumbnail_photo', methods=['POST']) | ||||||
|  | def post_album_remove_thumbnail_photo(album_id): | ||||||
|  |     album = common.P_album(album_id, response_type='json') | ||||||
|  |     album.set_thumbnail_photo(None) | ||||||
|  |     common.P.commit(message='album remove thumbnail photo endpoint') | ||||||
|  |     return jsonify.make_json_response(album.jsonify()) | ||||||
|  | 
 | ||||||
| @site.route('/album/<album_id>/refresh_directories', methods=['POST']) | @site.route('/album/<album_id>/refresh_directories', methods=['POST']) | ||||||
| def post_album_refresh_directories(album_id): | def post_album_refresh_directories(album_id): | ||||||
|     album = common.P_album(album_id, response_type='json') |     album = common.P_album(album_id, response_type='json') | ||||||
|  |  | ||||||
|  | @ -100,6 +100,14 @@ function remove_photos(album_id, photo_ids, callback) | ||||||
|     api.albums._add_remove_photos(album_id, photo_ids, "remove", callback); |     api.albums._add_remove_photos(album_id, photo_ids, "remove", callback); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | api.albums.remove_thumbnail_photo = | ||||||
|  | function remove_thumbnail_photo(album_id, callback) | ||||||
|  | { | ||||||
|  |     const url = `/album/${album_id}/remove_thumbnail_photo`; | ||||||
|  |     const data = new FormData(); | ||||||
|  |     common.post(url, data, callback); | ||||||
|  | } | ||||||
|  | 
 | ||||||
| api.albums.set_thumbnail_photo = | api.albums.set_thumbnail_photo = | ||||||
| function set_thumbnail_photo(album_id, photo_id, callback) | function set_thumbnail_photo(album_id, photo_id, callback) | ||||||
| { | { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue