mirror of
https://github.com/warp-tech/warpgate.git
synced 2024-11-10 09:12:56 +08:00
fixed #456 - postgres field type mismatch
This commit is contained in:
parent
4d8dea08a7
commit
022900be5a
6 changed files with 7 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -16,7 +16,9 @@ host_key*
|
|||
# ---
|
||||
|
||||
data
|
||||
data-*
|
||||
config.*.yaml
|
||||
config.yaml
|
||||
__pycache__
|
||||
.pytest_cache
|
||||
dhat-heap.json
|
||||
|
|
|
@ -10,7 +10,7 @@ pub struct Model {
|
|||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: Uuid,
|
||||
pub host: String,
|
||||
pub port: u16,
|
||||
pub port: i32,
|
||||
pub key_type: String,
|
||||
pub key_base64: String,
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ pub struct Model {
|
|||
pub secret: String,
|
||||
pub username: String,
|
||||
pub target: String,
|
||||
pub uses_left: Option<u32>,
|
||||
pub uses_left: Option<i32>,
|
||||
pub expiry: Option<DateTime<Utc>>,
|
||||
pub created: DateTime<Utc>,
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ pub mod ticket {
|
|||
pub secret: String,
|
||||
pub username: String,
|
||||
pub target: String,
|
||||
pub uses_left: Option<u32>,
|
||||
pub uses_left: Option<i16>,
|
||||
pub expiry: Option<DateTimeUtc>,
|
||||
pub created: DateTimeUtc,
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ pub mod known_host {
|
|||
#[sea_orm(primary_key, auto_increment = false)]
|
||||
pub id: Uuid,
|
||||
pub host: String,
|
||||
pub port: u16,
|
||||
pub port: i32,
|
||||
pub key_type: String,
|
||||
pub key_base64: String,
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ impl KnownHosts {
|
|||
let values = KnownHost::ActiveModel {
|
||||
id: Set(Uuid::new_v4()),
|
||||
host: Set(host.to_owned()),
|
||||
port: Set(port),
|
||||
port: Set(port.into()),
|
||||
key_type: Set(key.name().to_owned()),
|
||||
key_base64: Set(key.public_key_base64()),
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue