@@ -27,7 +27,7 @@ type TipherethRepo interface {
2727 * model.InternalID ) ([]* modeltiphereth.User , int64 , error )
2828 LinkAccount (context.Context , modeltiphereth.Account , model.InternalID ) error
2929 UnLinkAccount (context.Context , modeltiphereth.Account , model.InternalID ) error
30- ListLinkAccounts (context.Context , model.Paging , model. InternalID ) ([]* modeltiphereth.Account , int64 , error )
30+ ListLinkAccounts (context.Context , model.InternalID ) ([]* modeltiphereth.Account , error )
3131 GetUser (context.Context , model.InternalID ) (* modeltiphereth.User , error )
3232}
3333
@@ -356,21 +356,21 @@ func (t *Tiphereth) UnLinkAccount(ctx context.Context, a modeltiphereth.Account)
356356}
357357
358358func (t * Tiphereth ) ListLinkAccounts (
359- ctx context.Context , paging model. Paging , id model.InternalID ,
360- ) ([]* modeltiphereth.Account , int64 , * errors.Error ) {
359+ ctx context.Context , id model.InternalID ,
360+ ) ([]* modeltiphereth.Account , * errors.Error ) {
361361 if ! libauth .FromContextAssertUserType (ctx , libauth .UserTypeAdmin , libauth .UserTypeNormal ) {
362- return nil , 0 , pb .ErrorErrorReasonForbidden ("no permission" )
362+ return nil , pb .ErrorErrorReasonForbidden ("no permission" )
363363 }
364364 claims , exist := libauth .FromContext (ctx )
365365 if ! exist {
366- return nil , 0 , pb .ErrorErrorReasonUnauthorized ("invalid token" )
366+ return nil , pb .ErrorErrorReasonUnauthorized ("invalid token" )
367367 }
368368 if id == 0 {
369369 id = claims .InternalID
370370 }
371- a , total , err := t .repo .ListLinkAccounts (ctx , paging , id )
371+ a , err := t .repo .ListLinkAccounts (ctx , id )
372372 if err != nil {
373- return nil , 0 , pb .ErrorErrorReasonUnspecified ("%s" , err .Error ())
373+ return nil , pb .ErrorErrorReasonUnspecified ("%s" , err .Error ())
374374 }
375- return a , total , nil
375+ return a , nil
376376}
0 commit comments