🐛 Bug fixes due to api endpoint changed

This commit is contained in:
LittleSheep 2024-12-12 00:08:48 +08:00
parent 811fc40d79
commit 336bb88ca4
2 changed files with 2 additions and 2 deletions

View File

@ -55,7 +55,7 @@ class _PostEditorScreenState extends State<PostEditorScreen> {
try { try {
final sn = context.read<SnNetworkProvider>(); final sn = context.read<SnNetworkProvider>();
final resp = await sn.client.get('/cgi/co/publishers'); final resp = await sn.client.get('/cgi/co/publishers/me');
_publishers = List<SnPublisher>.from( _publishers = List<SnPublisher>.from(
resp.data?.map((e) => SnPublisher.fromJson(e)) ?? [], resp.data?.map((e) => SnPublisher.fromJson(e)) ?? [],
); );

View File

@ -35,7 +35,7 @@ class _PostMiniEditorState extends State<PostMiniEditor> {
try { try {
final sn = context.read<SnNetworkProvider>(); final sn = context.read<SnNetworkProvider>();
final resp = await sn.client.get('/cgi/co/publishers'); final resp = await sn.client.get('/cgi/co/publishers/me');
_publishers = List<SnPublisher>.from( _publishers = List<SnPublisher>.from(
resp.data?.map((e) => SnPublisher.fromJson(e)) ?? [], resp.data?.map((e) => SnPublisher.fromJson(e)) ?? [],
); );