ADD playgrounds images endpoint
+from typing import List
+
from flask import Blueprint
from anubis.lms.theia import initialize_ide, assert_theia_sessions_enabled
@@ -90,3 +92,22 @@ def public_playgrounds_active():
"active": True,
"session": session.data,
})
+
+
+@playgrounds_.get('/images')
+@require_user()
+@json_response
+def public_playgrounds_images():
+ """
+ Get public images
+
+ :return:
+ """
+
+ images: List[TheiaImage] = TheiaImage.query.filter(
+ TheiaImage.public == True
+ ).all()
+
+ return success_response({
+ 'images': [image.data for image in images]
+ })
