Skip to content

Commit

Permalink
Rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
Zokhoi committed Sep 24, 2024
1 parent af4cbd3 commit 0650030
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions deepwell/src/endpoints/parent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ pub async fn parent_modify(
input.child, input.site_id,
);

let creation = match input.added {
let creation = match input.add {
Some(parents) => {
let mut creation = Vec::new();
for parent in parents {
Expand All @@ -148,7 +148,7 @@ pub async fn parent_modify(
None => None,
};

let removal = match input.removed {
let removal = match input.remove {
Some(parents) => {
let mut removal = Vec::new();
for parent in parents {
Expand Down
4 changes: 2 additions & 2 deletions deepwell/src/services/parent/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ pub struct ParentDescription<'a> {
pub struct ParentModifyDescription<'a> {
pub site_id: i64,
pub child: Reference<'a>,
pub added: Option<Vec<Reference<'a>>>,
pub removed: Option<Vec<Reference<'a>>>,
pub add: Option<Vec<Reference<'a>>>,
pub remove: Option<Vec<Reference<'a>>>,
}

#[derive(Serialize, Deserialize, Debug, Copy, Clone, Hash, PartialEq, Eq)]
Expand Down
8 changes: 4 additions & 4 deletions framerail/src/lib/server/deepwell/page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,15 @@ export async function pageParentModify(
siteId: number,
pageId: number,
userId: number,
removed: string[],
added: string[]
add: string[],
remove: string[]
): Promise<object> {
return client.request("parent_modify", {
site_id: siteId,
child: pageId,
user_id: userId,
removed,
added
add,
remove
})
}

Expand Down
2 changes: 1 addition & 1 deletion framerail/src/routes/[slug]/[...extra]/+server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export async function POST(event) {
if (!common.includes(newParent[i])) added.push(newParent[i])
}

res = await page.pageParentModify(siteId, pageId, session?.user_id, removed, added)
res = await page.pageParentModify(siteId, pageId, session?.user_id, added, removed)
} else if (extra.includes("parentget")) {
res = await page.pageParentGet(siteId, pageId, slug)
} else if (extra.includes("score")) {
Expand Down

0 comments on commit 0650030

Please sign in to comment.