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