pinakes-server: add GET /plugins/ui-pages endpoint
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Id09d4dce060e0a79586251a16fb6bdbc6a6a6964
This commit is contained in:
parent
0525ea6c60
commit
29ba24ae01
3 changed files with 35 additions and 1 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use pinakes_plugin_api::UiPage;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
|
@ -21,6 +22,15 @@ pub struct TogglePluginRequest {
|
|||
pub enabled: bool,
|
||||
}
|
||||
|
||||
/// A single plugin UI page entry in the list response
|
||||
#[derive(Debug, Serialize)]
|
||||
pub struct PluginUiPageEntry {
|
||||
/// Plugin ID that provides this page
|
||||
pub plugin_id: String,
|
||||
/// Full page definition
|
||||
pub page: UiPage,
|
||||
}
|
||||
|
||||
impl PluginResponse {
|
||||
#[must_use]
|
||||
pub fn new(meta: pinakes_plugin_api::PluginMetadata, enabled: bool) -> Self {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue