Skip to content

Commit

Permalink
update ProjectRestrictedViewSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
mpro7 committed Jan 26, 2024
1 parent 6efaadd commit 103836a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 8 additions & 6 deletions src/api/admin/projects/projects-endpoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ describe("ProjectsEndpoint", () => {
(response: ApiResponseData<ProjectRestrictedViewSettingsResponse>) => {

expect(response.body.settings.size).toEqual("!512,512");
expect(response.body.settings.watermark).toEqual("path_to_image");
expect(response.body.settings.watermark).toEqual("true");

done();
});
Expand All @@ -705,7 +705,7 @@ describe("ProjectsEndpoint", () => {
(response: ApiResponseData<ProjectRestrictedViewSettingsResponse>) => {

expect(response.body.settings.size).toEqual("!512,512");
expect(response.body.settings.watermark).toEqual("path_to_image");
expect(response.body.settings.watermark).toEqual("true");

done();
});
Expand All @@ -728,7 +728,7 @@ describe("ProjectsEndpoint", () => {
(response: ApiResponseData<ProjectRestrictedViewSettingsResponse>) => {

expect(response.body.settings.size).toEqual("!512,512");
expect(response.body.settings.watermark).toEqual("path_to_image");
expect(response.body.settings.watermark).toEqual("true");

done();
});
Expand All @@ -755,7 +755,7 @@ describe("ProjectsEndpoint", () => {
(response: ApiResponseData<ProjectRestrictedViewSettingsResponse>) => {

expect(response.body.settings.size).toEqual("!512,512");
expect(response.body.settings.watermark).toEqual("path_to_image");
expect(response.body.settings.watermark).toEqual("true");

done();
});
Expand All @@ -781,8 +781,10 @@ describe("ProjectsEndpoint", () => {
knoraApiConnection.admin.projectsEndpoint.getProjectRestrictedViewSettingByShortname("images").subscribe(
(response: ApiResponseData<ProjectRestrictedViewSettingsResponse>) => {

console.log(111111, response.body)

expect(response.body.settings.size).toEqual("!512,512");
expect(response.body.settings.watermark).toEqual("path_to_image");
expect(response.body.settings.watermark).toEqual("true");

done();
});
Expand All @@ -809,7 +811,7 @@ describe("ProjectsEndpoint", () => {
(response: ApiResponseData<ProjectRestrictedViewSettingsResponse>) => {

expect(response.body.settings.size).toEqual("!512,512");
expect(response.body.settings.watermark).toEqual("path_to_image");
expect(response.body.settings.watermark).toEqual("true");

done();
});
Expand Down
4 changes: 2 additions & 2 deletions src/models/admin/project-restricted-view-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export class ProjectRestrictedViewSettings {
/**
* The watermark used in restricted image view in a project.
*/
@JsonProperty("watermark", String, true)
watermark?: string = undefined;
@JsonProperty("watermark", Boolean, true)
watermark?: Boolean = false;

}

0 comments on commit 103836a

Please sign in to comment.