1
0
mirror of https://github.com/xuthus83/pigallery2.git synced 2024-11-03 21:04:03 +08:00

setting default orientation

This commit is contained in:
Patrik J. Braun 2018-11-02 11:22:18 +01:00
parent a44d5b5031
commit 740528b42b
2 changed files with 6 additions and 6 deletions

View File

@ -80,7 +80,7 @@ export class PhotoMetadataEntity implements PhotoMetadata {
@Column(type => PositionMetaDataEntity) @Column(type => PositionMetaDataEntity)
positionData: PositionMetaDataEntity; positionData: PositionMetaDataEntity;
@Column('tinyint') @Column('tinyint', {default: 1})
orientation: OrientationTypes; orientation: OrientationTypes;
@Column(type => ImageSizeEntity) @Column(type => ImageSizeEntity)

View File

@ -66,13 +66,13 @@ describe('SearchManager', () => {
return d; return d;
}; };
let p = getPhoto(); const p = getPhoto();
p.metadata.keywords = ['Boba Fett', 'star wars', 'Anakin', 'death star']; p.metadata.keywords = ['Boba Fett', 'star wars', 'Anakin', 'death star'];
p.metadata.positionData.city = 'Mos Eisley'; p.metadata.positionData.city = 'Mos Eisley';
p.metadata.positionData.country = 'Tatooine'; p.metadata.positionData.country = 'Tatooine';
p.name = 'sw1'; p.name = 'sw1';
let p2 = getPhoto(); const p2 = getPhoto();
p2.metadata.keywords = ['Padmé Amidala', 'star wars', 'Natalie Portman', 'death star']; p2.metadata.keywords = ['Padmé Amidala', 'star wars', 'Natalie Portman', 'death star'];
p2.metadata.positionData.city = 'Derem City'; p2.metadata.positionData.city = 'Derem City';
p2.metadata.positionData.state = 'Research City'; p2.metadata.positionData.state = 'Research City';
@ -121,7 +121,7 @@ describe('SearchManager', () => {
it('should get autocomplete', async () => { it('should get autocomplete', async () => {
let sm = new SearchManager(); const sm = new SearchManager();
const cmp = (a: AutoCompleteItem, b: AutoCompleteItem) => { const cmp = (a: AutoCompleteItem, b: AutoCompleteItem) => {
return a.text.localeCompare(b.text); return a.text.localeCompare(b.text);
@ -153,7 +153,7 @@ describe('SearchManager', () => {
it('should search', async () => { it('should search', async () => {
let sm = new SearchManager(); const sm = new SearchManager();
expect((await sm.search('sw', null))).to.deep.equal(<SearchResultDTO>{ expect((await sm.search('sw', null))).to.deep.equal(<SearchResultDTO>{
searchText: 'sw', searchText: 'sw',
@ -198,7 +198,7 @@ describe('SearchManager', () => {
it('should instant search', async () => { it('should instant search', async () => {
let sm = new SearchManager(); const sm = new SearchManager();
expect((await sm.instantSearch('sw'))).to.deep.equal({ expect((await sm.instantSearch('sw'))).to.deep.equal({
searchText: 'sw', searchText: 'sw',