Skip to content

Commit

Permalink
Added field authorizedScopes to Fragment
Browse files Browse the repository at this point in the history
  • Loading branch information
Vas9ka committed Jul 19, 2024
1 parent 6eaee46 commit 1d366b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/fragmentarium/domain/Fragment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ const config: Parameters<typeof Fragment['create']>[0] = {
philadelphiaNumber: '123',
},
projects: [],
authorizedScopes: ['CAIC'],
}

describe('Fragment', () => {
Expand Down
1 change: 1 addition & 0 deletions src/fragmentarium/domain/FragmentDtos.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ export default interface FragmentDto {
excavationNumber?: MuseumNumber
}
colophon?: ColophonDto
authorziedScopes?: string[]
}
7 changes: 5 additions & 2 deletions src/fragmentarium/domain/fragment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ interface FragmentProps {
datesInText?: ReadonlyArray<MesopotamianDate>
archaeology?: Archaeology
colophon?: Colophon
authorizedScopes?: string[]
}

export class Fragment {
Expand Down Expand Up @@ -137,7 +138,8 @@ export class Fragment {
readonly date?: MesopotamianDate,
readonly datesInText?: ReadonlyArray<MesopotamianDate>,
readonly archaeology?: Archaeology,
readonly colophon?: Colophon
readonly colophon?: Colophon,
readonly authorizedScopes?: string[]
) {}

static create(props: FragmentProps): Fragment {
Expand Down Expand Up @@ -168,7 +170,8 @@ export class Fragment {
props.date,
props.datesInText,
props.archaeology,
props.colophon
props.colophon,
props.authorizedScopes
)
}

Expand Down

0 comments on commit 1d366b6

Please sign in to comment.