update amo repo methods
This commit is contained in:
parent
30192e61cb
commit
bba21decd3
@ -29,17 +29,11 @@ func NewAmoRepository(deps Deps) *AmoRepository {
|
||||
|
||||
// методы пользователя
|
||||
|
||||
func (r *AmoRepository) UpdateListUsers(ctx context.Context) error {
|
||||
//TODO:IMPLEMENT ME
|
||||
|
||||
return nil
|
||||
|
||||
}
|
||||
|
||||
func (r *AmoRepository) GettingUserWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListResp, error) {
|
||||
func (r *AmoRepository) GettingUserWithPagination(ctx context.Context, req *model.PaginationReq, accountID string) (*model.UserListResp, error) {
|
||||
rows, err := r.queries.GetUsersWithPagination(ctx, sqlcgen.GetUsersWithPaginationParams{
|
||||
Column1: req.Page,
|
||||
Limit: req.Size,
|
||||
Column1: req.Page,
|
||||
Limit: req.Size,
|
||||
Accountid: accountID,
|
||||
})
|
||||
|
||||
if err != nil {
|
||||
@ -273,10 +267,11 @@ func (r *AmoRepository) WebhookDelete(ctx context.Context) error {
|
||||
|
||||
// методы pipelines
|
||||
|
||||
func (r *AmoRepository) GetPipelinesWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListPipelinesResp, error) {
|
||||
func (r *AmoRepository) GetPipelinesWithPagination(ctx context.Context, req *model.PaginationReq, accountID string) (*model.UserListPipelinesResp, error) {
|
||||
rows, err := r.queries.GetPipelinesWithPagination(ctx, sqlcgen.GetPipelinesWithPaginationParams{
|
||||
Column1: req.Page,
|
||||
Limit: req.Size,
|
||||
Accountid: accountID,
|
||||
Column2: req.Page,
|
||||
Limit: req.Size,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -344,10 +339,11 @@ func (r *AmoRepository) CheckPipelines(ctx context.Context, pipelines []model.Pi
|
||||
|
||||
// методы steps
|
||||
|
||||
func (r *AmoRepository) GetStepsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListStepsResp, error) {
|
||||
func (r *AmoRepository) GetStepsWithPagination(ctx context.Context, req *model.PaginationReq, accountID string) (*model.UserListStepsResp, error) {
|
||||
rows, err := r.queries.GetStepsWithPagination(ctx, sqlcgen.GetStepsWithPaginationParams{
|
||||
Column1: req.Page,
|
||||
Limit: req.Size,
|
||||
Accountid: accountID,
|
||||
Column2: req.Page,
|
||||
Limit: req.Size,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -420,10 +416,11 @@ func (r *AmoRepository) CheckSteps(ctx context.Context, steps []model.Step) erro
|
||||
|
||||
// методы tags
|
||||
|
||||
func (r *AmoRepository) GetTagsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListTagsResp, error) {
|
||||
func (r *AmoRepository) GetTagsWithPagination(ctx context.Context, req *model.PaginationReq, accountID string) (*model.UserListTagsResp, error) {
|
||||
rows, err := r.queries.GetTagsWithPagination(ctx, sqlcgen.GetTagsWithPaginationParams{
|
||||
Column1: req.Page,
|
||||
Limit: req.Size,
|
||||
Accountid: accountID,
|
||||
Column2: req.Page,
|
||||
Limit: req.Size,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@ -506,10 +503,11 @@ func (r *AmoRepository) CheckTags(ctx context.Context, tags []model.Tag, tokenID
|
||||
|
||||
// методы fields
|
||||
|
||||
func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.PaginationReq) (*model.UserListFieldsResp, error) {
|
||||
func (r *AmoRepository) GetFieldsWithPagination(ctx context.Context, req *model.PaginationReq, accountID string) (*model.UserListFieldsResp, error) {
|
||||
rows, err := r.queries.GetFieldsWithPagination(ctx, sqlcgen.GetFieldsWithPaginationParams{
|
||||
Column1: req.Page,
|
||||
Limit: req.Size,
|
||||
Accountid: accountID,
|
||||
Column2: req.Page,
|
||||
Limit: req.Size,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Loading…
Reference in New Issue
Block a user