mdcpp / mdoj

Mingdao OnlineJudge, A performant contest management system base on cutting edge stack.
https://mdcpp.github.io/mdoj/
4 stars 1 forks source link

Grpc API change request (missing field/werid info) #94

Open KAIYOHUGO opened 6 days ago

KAIYOHUGO commented 6 days ago

Announcement List API provide sort by CREATE_DATE and PUBLIC

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L360-L361

But the response didn't provide such info (CREATE_DATE and PUBLIC)

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L298-L302

So I think we should add such info into AnnouncementInfo or remove it from sort.

Eason0729 commented 1 day ago

Adding such info would be appropriate.

Eason0729 commented 1 day ago

Can you also provide a list of similar issue(missing fields), so I could correct it in one pull request.

KAIYOHUGO commented 1 day ago

List User API have a similar issue

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L799-L800

It provide SORT_CREATE_DATE

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L777-L780

But response do not provide

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L719-L723

KAIYOHUGO commented 1 day ago

List Contest API have a similar issue

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L703-L704

It provide SORT_CREATE_DATE/SORT_UPDATE_DATE/SORT_PUBLIC

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L669-L675

But response do not provide, we should add such field or remove it from sort.

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L588-L594

KAIYOHUGO commented 1 day ago

The following message types has not be use. Consider remove them or provide such API

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L648-L651

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L653-L657

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L693

KAIYOHUGO commented 1 day ago

List Problem API have a similar issue

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L214-L215

It provide SORT_CREATE_DATE/SORT_UPDATE_DATE/SORT_PUBLIC

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L173-L181

But response do not provide, we should add such field or remove it from sort.

https://github.com/mdcpp/mdoj/blob/f4ee034cb8afca7d434e7334ecd407130cd02bd7/grpc/proto/backend.proto#L137-L150

Eason0729 commented 23 hours ago

Okay, I would work on it tomorrow.(If lab meeting goes well)