Skip to content

Commit 11b8181

Browse files
authored
Merge pull request #20 from amfoss/revert-13-master
Revert "Adds field for discord-id "
2 parents c38a73f + 5852767 commit 11b8181

File tree

3 files changed

+1
-5
lines changed

3 files changed

+1
-5
lines changed

migrations/20241017154637_add_discord_id_field.sql

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/db/member.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ pub struct Member {
1414
pub sex: String,
1515
pub year: i32,
1616
pub macaddress: String,
17-
pub discord_id: String,
1817
}

src/graphql/mutations.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ impl MutationRoot {
2929
sex: String,
3030
year: i32,
3131
macaddress: String,
32-
discord_id: String,
3332

3433
) -> Result<Member, sqlx::Error> {
3534
let pool = ctx.data::<Arc<PgPool>>().expect("Pool not found in context");
3635

3736

3837

3938
let member = sqlx::query_as::<_, Member>(
40-
"INSERT INTO Member (rollno, name, hostel, email, sex, year, macaddress, discord_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8) RETURNING *"
39+
"INSERT INTO Member (rollno, name, hostel, email, sex, year, macaddress) VALUES ($1, $2, $3, $4, $5, $6, $7) RETURNING *"
4140
)
4241
.bind(rollno)
4342
.bind(name)
@@ -46,7 +45,6 @@ impl MutationRoot {
4645
.bind(sex)
4746
.bind(year)
4847
.bind(macaddress)
49-
.bind(discord_id)
5048
.fetch_one(pool.as_ref())
5149
.await?;
5250

0 commit comments

Comments
 (0)