mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-06-05 06:34:13 -04:00
Fix dapper user json parsing
This commit is contained in:
parent
1335ae13e8
commit
633db89031
@ -99,7 +99,7 @@ public class UserRepository(
|
|||||||
from
|
from
|
||||||
users as u
|
users as u
|
||||||
where
|
where
|
||||||
u.external_id->{provider}->>'id' = {id}
|
u.external_id->{provider}->>'Id' = {id}
|
||||||
""",
|
""",
|
||||||
new() { ["u"] = typeof(User) },
|
new() { ["u"] = typeof(User) },
|
||||||
(items) => (items[0] as User)!,
|
(items) => (items[0] as User)!,
|
||||||
|
@ -97,6 +97,14 @@ namespace Kyoo.Postgresql
|
|||||||
typeof(Dictionary<string, MetadataId>),
|
typeof(Dictionary<string, MetadataId>),
|
||||||
new JsonTypeHandler<Dictionary<string, MetadataId>>()
|
new JsonTypeHandler<Dictionary<string, MetadataId>>()
|
||||||
);
|
);
|
||||||
|
SqlMapper.AddTypeHandler(
|
||||||
|
typeof(Dictionary<string, string>),
|
||||||
|
new JsonTypeHandler<Dictionary<string, string>>()
|
||||||
|
);
|
||||||
|
SqlMapper.AddTypeHandler(
|
||||||
|
typeof(Dictionary<string, ExternalToken>),
|
||||||
|
new JsonTypeHandler<Dictionary<string, ExternalToken>>()
|
||||||
|
);
|
||||||
SqlMapper.AddTypeHandler(typeof(List<string>), new ListTypeHandler<string>());
|
SqlMapper.AddTypeHandler(typeof(List<string>), new ListTypeHandler<string>());
|
||||||
SqlMapper.AddTypeHandler(typeof(List<Genre>), new ListTypeHandler<Genre>());
|
SqlMapper.AddTypeHandler(typeof(List<Genre>), new ListTypeHandler<Genre>());
|
||||||
SqlMapper.AddTypeHandler(typeof(Wrapper), new Wrapper.Handler());
|
SqlMapper.AddTypeHandler(typeof(Wrapper), new Wrapper.Handler());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user