Skip to content

Commit ddeeb14

Browse files
committed
Fix a few things
1 parent 66b4b32 commit ddeeb14

6 files changed

Lines changed: 70 additions & 68 deletions

File tree

database/sqlx-data.json

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -459,70 +459,6 @@
459459
"nullable": []
460460
}
461461
},
462-
"13d5c565c7c14d1ba739efd311e4a7cf9ec578109f95b56b10a2c89068ca53fc": {
463-
"query": "\n SELECT\n `item_id` AS `id`,\n MIN(`comic_id`) AS `first`,\n MAX(`comic_id`) AS `last`,\n COUNT(`comic_id`) AS `count`\n FROM `Occurrence`\n WHERE `item_id` = ?\n ",
464-
"describe": {
465-
"columns": [
466-
{
467-
"ordinal": 0,
468-
"name": "id",
469-
"type_info": {
470-
"type": "Short",
471-
"flags": {
472-
"bits": 4139
473-
},
474-
"char_set": 63,
475-
"max_size": 6
476-
}
477-
},
478-
{
479-
"ordinal": 1,
480-
"name": "first",
481-
"type_info": {
482-
"type": "Short",
483-
"flags": {
484-
"bits": 160
485-
},
486-
"char_set": 63,
487-
"max_size": 6
488-
}
489-
},
490-
{
491-
"ordinal": 2,
492-
"name": "last",
493-
"type_info": {
494-
"type": "Short",
495-
"flags": {
496-
"bits": 160
497-
},
498-
"char_set": 63,
499-
"max_size": 6
500-
}
501-
},
502-
{
503-
"ordinal": 3,
504-
"name": "count",
505-
"type_info": {
506-
"type": "LongLong",
507-
"flags": {
508-
"bits": 129
509-
},
510-
"char_set": 63,
511-
"max_size": 21
512-
}
513-
}
514-
],
515-
"parameters": {
516-
"Right": 1
517-
},
518-
"nullable": [
519-
false,
520-
true,
521-
true,
522-
false
523-
]
524-
}
525-
},
526462
"1b5cd972500fdfed5f41fa9d48c232d45fc1043089147fb87513aef1006a3732": {
527463
"query": "\n UPDATE `Comic`\n SET\n `has_no_tagline` = ?\n WHERE\n `id` = ?\n ",
528464
"describe": {
@@ -2143,6 +2079,70 @@
21432079
]
21442080
}
21452081
},
2082+
"f95d8b69af9939012fd33a0fb2bc0f9865ea197736527470d82c16696bbbc33c": {
2083+
"query": "\n SELECT\n `item_id` AS `id`,\n MIN(`comic_id`) AS `first`,\n MAX(`comic_id`) AS `last`,\n COUNT(`comic_id`) AS `count`\n FROM `Occurrence`\n WHERE `item_id` = ?\n GROUP by `item_id`\n ",
2084+
"describe": {
2085+
"columns": [
2086+
{
2087+
"ordinal": 0,
2088+
"name": "id",
2089+
"type_info": {
2090+
"type": "Short",
2091+
"flags": {
2092+
"bits": 4139
2093+
},
2094+
"char_set": 63,
2095+
"max_size": 6
2096+
}
2097+
},
2098+
{
2099+
"ordinal": 1,
2100+
"name": "first",
2101+
"type_info": {
2102+
"type": "Short",
2103+
"flags": {
2104+
"bits": 160
2105+
},
2106+
"char_set": 63,
2107+
"max_size": 6
2108+
}
2109+
},
2110+
{
2111+
"ordinal": 2,
2112+
"name": "last",
2113+
"type_info": {
2114+
"type": "Short",
2115+
"flags": {
2116+
"bits": 160
2117+
},
2118+
"char_set": 63,
2119+
"max_size": 6
2120+
}
2121+
},
2122+
{
2123+
"ordinal": 3,
2124+
"name": "count",
2125+
"type_info": {
2126+
"type": "LongLong",
2127+
"flags": {
2128+
"bits": 129
2129+
},
2130+
"char_set": 63,
2131+
"max_size": 21
2132+
}
2133+
}
2134+
],
2135+
"parameters": {
2136+
"Right": 1
2137+
},
2138+
"nullable": [
2139+
false,
2140+
true,
2141+
true,
2142+
false
2143+
]
2144+
}
2145+
},
21462146
"f98f389b7de89f952e5c0b56a8389800b2f61c9bd26fef5e83c61d8d1be27251": {
21472147
"query": "\n SELECT `publish_date` FROM `Comic` WHERE `id` = ?\n ",
21482148
"describe": {

database/src/models/item.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ impl Item {
127127
COUNT(`comic_id`) AS `count`
128128
FROM `Occurrence`
129129
WHERE `item_id` = ?
130+
GROUP by `item_id`
130131
"#,
131132
id
132133
)

src/controllers/api/comic/all.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ pub(crate) async fn all(
2626

2727
pub(crate) async fn excluded(
2828
pool: web::Data<DbPool>,
29-
query: web::Query<AllQuery>,
29+
query: web::Query<ExcludedQuery>,
3030
) -> Result<HttpResponse> {
31-
let (is_guest_comic, is_non_canon) = match query.exclude {
31+
let (is_guest_comic, is_non_canon) = match query.exclusion {
3232
None => {
3333
return Err(error::ErrorBadRequest(
3434
"exclude parameter must be set to either `guest` or `non-canon`",

src/controllers/api/log.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ async fn get(
4545

4646
#[derive(Debug, Deserialize)]
4747
struct LogQuery {
48+
#[allow(unused)]
4849
token: Token,
4950
page: u16,
5051
}

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
// Warn (try not to do this)
5555
#![warn(clippy::must_use_candidate)]
5656
#![warn(clippy::enum_variant_names)]
57-
#![warn(clippy::shadow_unrelated)]
57+
//#![warn(clippy::shadow_unrelated)]
5858
#![warn(clippy::similar_names)]
5959
#![warn(clippy::too_many_lines)]
6060
// </editor-fold>

src/util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use actix_web_grants::permissions::{AuthDetails, PermissionsCheck};
22
use anyhow::{anyhow, Result};
3-
use chrono::{DateTime, Datelike, NaiveDate, TimeZone, Timelike, Utc};
3+
use chrono::{DateTime, Datelike, TimeZone, Timelike, Utc};
44
use futures::Future;
55
use ilyvion_util::chrono::days_from_month_in_year;
66
use ilyvion_util::string_extensions::StrExtensions;

0 commit comments

Comments
 (0)