File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed
Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ export class AppHandler {
255255 if (
256256 ! data . ipynbs . id ||
257257 typeof data . ipynbs . id !== 'string' ||
258- data . ipynbs . id . length > 20
258+ data . ipynbs . id . length > 9
259259 )
260260 return res . status ( 400 ) . send ( 'malformed request' )
261261
@@ -976,15 +976,21 @@ export class AppHandler {
976976 if ( oldNotebook ?. sha ) {
977977 oldsha = oldNotebook ?. sha
978978 }
979- applets ?. forEach ?. ( ( applet ) => {
980- if ( typeof applet . presentToStudents !== 'undefined' ) return
981- const oldApplet = oldNotebook ?. applets ?. find ?. (
982- ( appl ) => appl . appid === applet . appid
983- )
984- if ( typeof oldApplet ?. presentToStudents !== 'undefined' )
985- applet . presentToStudents = oldApplet . presentToStudents
986- else applet . presentToStudents = false
987- } )
979+ applets
980+ ?. forEach ?. ( ( applet ) => {
981+ if ( typeof applet . presentToStudents !== 'undefined' ) return
982+ const oldApplet = oldNotebook ?. applets ?. find ?. (
983+ ( appl ) => appl . appid === applet . appid
984+ )
985+ if ( typeof oldApplet ?. presentToStudents !== 'undefined' )
986+ applet . presentToStudents = oldApplet . presentToStudents
987+ else applet . presentToStudents = false
988+ } )
989+ ?. map ?. ( ( el ) => ( {
990+ appid : el . appid ,
991+ appname : el . appname ,
992+ presentToStudents : el . presentToStudents
993+ } ) )
988994 const pynb = {
989995 id : body . id ,
990996 name : body . name ,
You can’t perform that action at this time.
0 commit comments