Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix orm #122

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/repo/package.v
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ pub fn (p PackagesRepo) get_most_downloaded_packages() []Package {
} or { [] }
}

pub fn (p PackagesRepo) update_package_stars(package_id int, stars int) ! {
pub fn (p PackagesRepo) update_package_stars(package_id int, stars_ int) ! {
sql p.db {
update Package set stars = stars where id == package_id
update Package set stars = stars_ where id == package_id
}!
}

pub fn (p PackagesRepo) update_package_info(package_id int, name string, url string, description string) ! {
pub fn (p PackagesRepo) update_package_info(package_id int, name_ string, url_ string, description_ string) ! {
sql p.db {
update Package set name = name, url = url, description = description where id == package_id
update Package set name = name_, url = url_, description = description_ where id == package_id
}!
}
Loading