fix datastore
All checks were successful
Build and Test / fast-racing-neo (push) Successful in 14m3s
Build and Test / mario-tennis (push) Successful in 14m7s
Build and Test / sonic-transformed (push) Successful in 14m17s
Build and Test / friends (push) Successful in 14m24s
Build and Test / wii-sports-club (push) Successful in 15m28s
Build and Test / wii-u-chat (push) Successful in 15m28s
Build and Test / puyopuyo (push) Successful in 15m38s
Build and Test / minecraft-wiiu (push) Successful in 15m44s
Build and Test / splatoon (push) Successful in 16m18s
Build and Test / super-mario-maker (push) Successful in 18m6s
Build and Test / splatoon-testfire (push) Successful in 18m18s
All checks were successful
Build and Test / fast-racing-neo (push) Successful in 14m3s
Build and Test / mario-tennis (push) Successful in 14m7s
Build and Test / sonic-transformed (push) Successful in 14m17s
Build and Test / friends (push) Successful in 14m24s
Build and Test / wii-sports-club (push) Successful in 15m28s
Build and Test / wii-u-chat (push) Successful in 15m28s
Build and Test / puyopuyo (push) Successful in 15m38s
Build and Test / minecraft-wiiu (push) Successful in 15m44s
Build and Test / splatoon (push) Successful in 16m18s
Build and Test / super-mario-maker (push) Successful in 18m6s
Build and Test / splatoon-testfire (push) Successful in 18m18s
This commit is contained in:
parent
25bdbb42eb
commit
f6d69d1e82
1 changed files with 5 additions and 5 deletions
|
|
@ -38,7 +38,7 @@ fn map_row_to_meta_info(
|
||||||
) -> GetMetaInfo {
|
) -> GetMetaInfo {
|
||||||
GetMetaInfo {
|
GetMetaInfo {
|
||||||
dataid: row_data_id as u64,
|
dataid: row_data_id as u64,
|
||||||
owner: row_owner as u32,
|
owner: row_owner as PID,
|
||||||
size: row_size as u32,
|
size: row_size as u32,
|
||||||
name: row_name,
|
name: row_name,
|
||||||
data_type: row_data_type as u16,
|
data_type: row_data_type as u16,
|
||||||
|
|
@ -47,14 +47,14 @@ fn map_row_to_meta_info(
|
||||||
permission: row_permission as u8,
|
permission: row_permission as u8,
|
||||||
recipient_ids: row_permission_recipients
|
recipient_ids: row_permission_recipients
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|id| id as u32)
|
.map(|id| id as PID)
|
||||||
.collect(),
|
.collect(),
|
||||||
},
|
},
|
||||||
del_permission: Permission {
|
del_permission: Permission {
|
||||||
permission: row_delete_permission as u8,
|
permission: row_delete_permission as u8,
|
||||||
recipient_ids: row_delete_permission_recipients
|
recipient_ids: row_delete_permission_recipients
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|id| id as u32)
|
.map(|id| id as PID)
|
||||||
.collect(),
|
.collect(),
|
||||||
},
|
},
|
||||||
period: row_period as u16,
|
period: row_period as u16,
|
||||||
|
|
@ -409,7 +409,7 @@ async fn get_custom_rankings_by_data_ids(
|
||||||
results
|
results
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn get_user_course_object_ids(owner_pid: u32) -> Result<Vec<u64>, ErrorCode> {
|
async fn get_user_course_object_ids(owner_pid: PID) -> Result<Vec<u64>, ErrorCode> {
|
||||||
let rows = sqlx::query!(
|
let rows = sqlx::query!(
|
||||||
r#"
|
r#"
|
||||||
SELECT data_id
|
SELECT data_id
|
||||||
|
|
@ -719,7 +719,7 @@ impl DataStore for User {
|
||||||
return Err(ErrorCode::DataStore_UnderReviewing);
|
return Err(ErrorCode::DataStore_UnderReviewing);
|
||||||
}
|
}
|
||||||
|
|
||||||
if record.owner.unwrap_or(0) as u32 != self.pid {
|
if record.owner.unwrap_or(0) as PID != self.pid {
|
||||||
return Err(ErrorCode::DataStore_PermissionDenied);
|
return Err(ErrorCode::DataStore_PermissionDenied);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue