add method to endpoint
This commit is contained in:
7 files changed
+29
-9
No files matched your search
@@ -216,7 +216,7 @@ impl Store {
|
||||
input: DeviceIdentifierInput,
|
||||
) -> Result<Option<KnownDevice>> {
|
||||
let identifier = normalize_device_identifier(input)?;
|
||||
let identifier_key = normalized_identifier_key_owned(identifier);
|
||||
let identifier_key = identifier.identifier_key;
|
||||
let device_id = sqlx::query_scalar!(
|
||||
"SELECT device_id FROM device_identifiers WHERE identifier_key = ?1",
|
||||
identifier_key
|
||||
|
||||
@@ -70,11 +70,6 @@ pub fn normalize_device_identifier(
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg_attr(not(test), allow(dead_code))]
|
||||
pub fn normalized_identifier_key_owned(identifier: NormalizedDeviceIdentifier) -> String {
|
||||
identifier.identifier_key
|
||||
}
|
||||
|
||||
pub async fn list_enroll_token_rows(pool: &SqlitePool) -> Result<Vec<EnrollTokenRow>> {
|
||||
sqlx::query_as!(
|
||||
EnrollTokenRow,
|
||||
|
||||
Reference in new issue
Block a user