zyratlo commented on code in PR #7132:
URL: https://github.com/apache/texera/pull/7132#discussion_r3686363987


##########
notebook-migration-service/src/main/scala/org/apache/texera/service/resource/NotebookMigrationResource.scala:
##########
@@ -374,6 +381,46 @@ object NotebookMigrationResource extends LazyLogging {
           .build()
     }
   }
+
+  // Delete notebook + mapping for a workflow. The notebook -> 
workflow_notebook_mapping FK is
+  // ON DELETE CASCADE, so deleting the notebook row removes its mapping rows 
too. notebook.wid
+  // is UNIQUE (one notebook per workflow), so wid alone identifies the row 
and vid is not needed.
+  def deleteNotebookAndMapping(body: String, uid: java.lang.Integer): Response 
= {
+    try {
+      val json = mapper.readTree(body)
+
+      val wid: java.lang.Integer = json.get("wid").asInt()

Review Comment:
   added validation in 
[fc4ce73](https://github.com/apache/texera/pull/7132/commits/fc4ce734d83d69b276bf642d9bf9c0c457c50ed7)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to