File tree Expand file tree Collapse file tree
src/main/kotlin/org/openmbee/flexo/sysmlv2/apis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -425,8 +425,12 @@ fun Route.CommitApi() {
425425 delete {
426426 ?element_n ?element_p ?element_o .
427427
428- ?incoming ?incoming_p ?element_del ;
429- ?incoming_order_p ?incoming_order_o .
428+ ${if (deleteIncoming.isNotEmpty()) {
429+ """
430+ ?incoming ?incoming_relation_p ?element_del ;
431+ ?incoming_order_p ?incoming_order_o .
432+ """ .reindent(4 )
433+ } else " " }
430434 }
431435 insert {
432436 ${inserts.joinToString(" \n\n " ).reindent(4 )}
Original file line number Diff line number Diff line change 1111*/
1212package org.openmbee.flexo.sysmlv2.apis
1313
14+ import io.ktor.client.request.*
15+ import io.ktor.http.*
1416import io.ktor.server.application.*
1517import io.ktor.server.resources.*
1618import io.ktor.server.response.*
@@ -94,9 +96,17 @@ fun Route.ProjectApi() {
9496
9597 // create new project via POST
9698 post<ProjectRequest >(" /projects" ) { projectRequest ->
99+ // just always make sure org is there
100+ flexoRequestPut {
101+ orgPath(" " )
102+ turtle {"""
103+ <> dct:title "sysmlv2"@en .
104+ """
105+ }
106+ }
97107 // generate a UUID for the repo
98108 val repoUuid = UUID .randomUUID()
99-
109+
100110 // generate a UUID for the default branch
101111 val branchUuid = UUID .randomUUID()
102112
@@ -136,6 +146,14 @@ fun Route.ProjectApi() {
136146
137147 // create new project via PUT
138148 put<ProjectRequest >(" /projects/{projectId}" ) { projectRequest ->
149+ // just always make sure org is there
150+ flexoRequestPut {
151+ orgPath(" " )
152+ turtle {"""
153+ <> dct:title "sysmlv2"@en .
154+ """
155+ }
156+ }
139157 val projectId = " ${call.parameters[" projectId" ]} "
140158
141159 // generate a UUID for the default branch
You can’t perform that action at this time.
0 commit comments