Skip to content

Commit 3d7d01c

Browse files
committed
fix: fix adding new loader versions
1 parent fe3e431 commit 3d7d01c

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

src/types/models/loader_version.rs

+10-9
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,19 @@ impl LoaderVersion {
179179
}
180180

181181
pub async fn create_version(version: LoaderVersionCreate, pool: &mut PgConnection) -> Result<(), ApiError> {
182-
match sqlx::query(
182+
match sqlx::query!(
183183
r#"INSERT INTO geode_versions
184184
(tag, prerelease, mac, win, android, ios, commit_hash)
185185
VALUES
186-
($1, $2, $3, $4, $5, $6)"#)
187-
.bind(version.tag)
188-
.bind(version.prerelease)
189-
.bind(version.mac)
190-
.bind(version.win)
191-
.bind(version.android)
192-
.bind(version.ios)
193-
.bind(version.commit_hash)
186+
($1, $2, $3, $4, $5, $6, $7)"#,
187+
version.tag,
188+
version.prerelease,
189+
version.mac as _,
190+
version.win as _,
191+
version.android as _,
192+
version.ios as _,
193+
version.commit_hash
194+
)
194195
.execute(&mut *pool)
195196
.await
196197
{

0 commit comments

Comments
 (0)