mirror of
				https://github.com/KevinMidboe/Node-Com-Handler.git
				synced 2025-10-29 17:50:27 +00:00 
			
		
		
		
	Changed 'disks' to do some error handling and doesn't return errors from diskusage.py
This commit is contained in:
		| @@ -64,10 +64,10 @@ def bad_request(error): | |||||||
| @app.route('/api/v1/disks', methods=['GET']) | @app.route('/api/v1/disks', methods=['GET']) | ||||||
| @auth.login_required | @auth.login_required | ||||||
| def get_diskUsage(): | def get_diskUsage(): | ||||||
| 	 | 	try: | ||||||
| 	if (diskUsage()): | 		returningDiskUsage = diskUsage(request.args.get('dir')) | ||||||
| 		return jsonify(diskUsage()) | 		return jsonify(returningDiskUsage) | ||||||
| 	else: | 	except: | ||||||
| 		abort(404) | 		abort(404) | ||||||
|  |  | ||||||
| @app.route('/api/v1/disks/<disk_name>', methods=['GET']) | @app.route('/api/v1/disks/<disk_name>', methods=['GET']) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user