Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-go
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-go
Commits
5692d7e4
Commit
5692d7e4
authored
1 year ago
by
Pavel Antonov
Browse files
Options
Downloads
Patches
Plain Diff
Revert "Merge branch 'feature/PRXS-1285-ItemsFix' into 'master'"
This reverts merge request !51
parent
70b94075
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
perxis-proto
+1
-1
1 addition, 1 deletion
perxis-proto
pkg/items/pagination.go
+1
-3
1 addition, 3 deletions
pkg/items/pagination.go
pkg/items/service.go
+0
-22
0 additions, 22 deletions
pkg/items/service.go
with
2 additions
and
26 deletions
perxis-proto
@
8606df02
Compare
f000812a
...
8606df02
Subproject commit
f000812a1eef24093c0d0abf1318e3179b679773
Subproject commit
8606df02e0df6807e503bf22471a295020a47fba
This diff is collapsed.
Click to expand it.
pkg/items/pagination.go
+
1
−
3
View file @
5692d7e4
...
...
@@ -10,9 +10,7 @@ import (
)
type
BatchProcessor
struct
{
Items
Items
// fixme: после того как здесь Content поменяли на Items (из-за цикличного импорта)
// использование в perxis BatchProcessor'a необходимо менять
// стоит ли это так делать или лучше в perxis-go BatchProcessor вынести в отдельный пакет чтобы не было цикличного импорта?
Items
Items
SpaceID
,
EnvID
,
CollectionID
string
FindOptions
*
FindOptions
FindPublishedOptions
*
FindPublishedOptions
...
...
This diff is collapsed.
Click to expand it.
pkg/items/service.go
+
0
−
22
View file @
5692d7e4
...
...
@@ -149,25 +149,3 @@ func EncodeAggregateResult(ctx context.Context, request map[string]string, r map
return
result
,
nil
}
func
CreateAndPublishItem
(
ctx
context
.
Context
,
items
Items
,
item
*
Item
)
error
{
var
err
error
if
item
,
err
=
items
.
Create
(
ctx
,
item
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"create item"
)
}
if
err
=
items
.
Publish
(
ctx
,
item
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"publish item"
)
}
return
nil
}
func
UpdateAndPublishItem
(
ctx
context
.
Context
,
items
Items
,
item
*
Item
)
error
{
var
err
error
if
err
=
items
.
Update
(
ctx
,
item
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"update item"
)
}
if
err
=
items
.
Publish
(
ctx
,
item
);
err
!=
nil
{
return
errors
.
Wrap
(
err
,
"publish item"
)
}
return
nil
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment