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