-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
14 changes: 9 additions & 5 deletions
14
...rc/main/kotlin/com/sphereon/oid/fed/server/admin/controllers/EntityStatementController.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
package com.sphereon.oid.fed.server.admin.controllers | ||
|
||
import com.sphereon.oid.fed.openapi.models.EntityConfigurationStatement | ||
import com.sphereon.oid.fed.services.EntityStatementService | ||
import org.springframework.web.bind.annotation.* | ||
import com.sphereon.oid.fed.services.EntityConfigurationStatementService | ||
import org.springframework.web.bind.annotation.GetMapping | ||
import org.springframework.web.bind.annotation.PathVariable | ||
import org.springframework.web.bind.annotation.PostMapping | ||
import org.springframework.web.bind.annotation.RequestMapping | ||
import org.springframework.web.bind.annotation.RestController | ||
|
||
@RestController | ||
@RequestMapping("/accounts/{accountUsername}/entity-statement") | ||
class EntityStatementController { | ||
private val entityStatementService = EntityStatementService() | ||
private val entityConfigurationStatementService = EntityConfigurationStatementService() | ||
|
||
@GetMapping | ||
fun getEntityStatement(@PathVariable accountUsername: String): EntityConfigurationStatement { | ||
return entityStatementService.findByUsername(accountUsername) | ||
return entityConfigurationStatementService.findByUsername(accountUsername) | ||
} | ||
|
||
@PostMapping | ||
fun publishEntityStatement(@PathVariable accountUsername: String): EntityConfigurationStatement { | ||
return entityStatementService.publishByUsername(accountUsername) | ||
return entityConfigurationStatementService.publishByUsername(accountUsername) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters