Skip to content

Commit

Permalink
fixed mark for highlight data (#4303)
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo authored Aug 22, 2023
1 parent ce18b3b commit ed5e0ff
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 14 deletions.
2 changes: 1 addition & 1 deletion e2e/server/requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
honcho
gunicorn
git+https://github.com/superdesk/superdesk-core.git@hotfix/2.6.5#egg=Superdesk-Core
git+https://github.com/superdesk/superdesk-core.git@develop#egg=Superdesk-Core
20 changes: 9 additions & 11 deletions e2e/server/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ arrow==0.13.0
# via
# eve-elastic
# superdesk-core
async-timeout==4.0.2
async-timeout==4.0.3
# via redis
authlib==0.14.3
# via superdesk-core
Expand All @@ -26,17 +26,17 @@ blinker==1.4
# flask-mail
# raven
# superdesk-core
boto3==1.28.20
boto3==1.28.30
# via superdesk-core
botocore==1.31.20
botocore==1.31.30
# via
# boto3
# s3transfer
cachetools==5.3.1
# via flask-oidc-ex
celery[redis]==5.2.7
# via superdesk-core
cerberus==1.3.4
cerberus==1.3.5
# via
# eve
# superdesk-core
Expand All @@ -55,13 +55,14 @@ charset-normalizer==3.2.0
# via requests
ciso8601==1.0.8
# via eve-elastic
click==8.1.6
click==8.1.7
# via
# celery
# click-didyoumean
# click-plugins
# click-repl
# flask
# superdesk-core
click-didyoumean==0.3.0
# via celery
click-plugins==1.1.1
Expand All @@ -78,7 +79,7 @@ deprecated==1.2.14
# via jwcrypto
draftjs-exporter[lxml]==2.1.7
# via superdesk-core
ecs-logging==2.0.2
ecs-logging==2.1.0
# via elastic-apm
elastic-apm[flask]==6.18.0
# via superdesk-core
Expand Down Expand Up @@ -224,7 +225,7 @@ requests-oauthlib==1.3.1
# via python-twitter
rsa==4.9
# via oauth2client
s3transfer==0.6.1
s3transfer==0.6.2
# via boto3
sgmllib3k==1.0.0
# via feedparser
Expand All @@ -236,7 +237,7 @@ six==1.16.0
# flask-oidc-ex
# oauth2client
# python-dateutil
superdesk-core @ git+https://github.com/superdesk/superdesk-core.git@hotfix/2.6.5
superdesk-core @ git+https://github.com/superdesk/superdesk-core.git@develop
# via -r requirements.in
typing-extensions==4.7.1
# via superdesk-core
Expand Down Expand Up @@ -268,6 +269,3 @@ wrapt==1.15.0
# via
# deprecated
# elastic-apm

# The following packages are considered to be unsafe in a requirements file:
# setuptools
2 changes: 1 addition & 1 deletion scripts/apps/highlights/services/HighlightsService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export function HighlightsService(api, $q, $cacheFactory, packages: IPackagesSer
* Mark an item for a highlight
*/
service.markItem = function(highlight, markedItem) {
return api.save('marked_for_highlights', {highlights: highlight, marked_item: markedItem._id});
return api.save('marked_for_highlights', {highlights: [highlight], marked_item: markedItem._id});
};

/**
Expand Down
2 changes: 1 addition & 1 deletion scripts/apps/highlights/tests/highlights.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('highlights', () => {
it('can mark item for highlights', inject((highlightsService, api, $q) => {
spyOn(api, 'save').and.returnValue($q.when({}));
highlightsService.markItem('h1', {_id: 'id', guid: 'guid'});
expect(api.save).toHaveBeenCalledWith('marked_for_highlights', {highlights: 'h1', marked_item: 'id'});
expect(api.save).toHaveBeenCalledWith('marked_for_highlights', {highlights: ['h1'], marked_item: 'id'});
}));

it('can save highlights configuration', inject((highlightsService, api, $q) => {
Expand Down

0 comments on commit ed5e0ff

Please sign in to comment.