File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -177,8 +177,9 @@ def resetDefaultPrograms():
177177 q = p .read ()
178178 programs .insert (json .loads (q ))
179179
180- def uploadFile ():
180+ def updateFromPackage ():
181+ os .system ('sudo bash /home/pi/clean-update.sh' )
181182 file_to_upload = connexion .request .files ['file_to_upload' ]
182- file_to_upload .save (os .path .join ('updatePackages ' , file_to_upload . filename ))
183- os .system ('sudo coderbot_update updatePackages/' + file_to_upload . filename )
183+ file_to_upload .save (os .path .join ('/home/pi/ ' , 'update.tar' ))
184+ os .system ('sudo coderbot_update /home/pi/update.tar && sudo reboot' )
184185 return 200
Original file line number Diff line number Diff line change 7474 description : " ok"
7575 400 :
7676 description : " Failed to save the activity"
77- /uploadFile :
77+ /updateFromPackage :
7878 post :
79- operationId : " api.uploadFile "
79+ operationId : " api.updateFromPackage "
8080 consumes :
8181 - multipart/form-data
8282 parameters :
You can’t perform that action at this time.
0 commit comments