use new api updater features
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
committed by
Wolfgang Bumiller
parent
be5b468975
commit
a8a20e9210
@ -30,7 +30,7 @@ use lazy_static::lazy_static;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
use proxmox::api::api;
|
||||
use proxmox::api::schema::{ApiStringFormat, Schema, StringSchema};
|
||||
use proxmox::api::schema::{ApiStringFormat, Schema, StringSchema, Updatable};
|
||||
use proxmox::const_regex;
|
||||
|
||||
// we only allow a limited set of characters
|
||||
@ -403,6 +403,12 @@ pub struct Userid {
|
||||
name_len: usize,
|
||||
}
|
||||
|
||||
impl Updatable for Userid {
|
||||
type Updater = Option<Userid>;
|
||||
|
||||
const UPDATER_IS_OPTION: bool = true;
|
||||
}
|
||||
|
||||
impl Userid {
|
||||
pub const API_SCHEMA: Schema = StringSchema::new("User ID")
|
||||
.format(&PROXMOX_USER_ID_FORMAT)
|
||||
|
Reference in New Issue
Block a user