Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' into feature/#904-Make-title-or-teaser-image-c…
Browse files Browse the repository at this point in the history
…lickable
  • Loading branch information
kesselb authored Oct 29, 2018
2 parents 555dcfa + 49c8d41 commit 3ab2d46
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Execute npm rebuild in docker. [#855](https://github.com/geli-lms/geli/pull/855)
- Sentry reporting for missing translations. [#858](https://github.com/geli-lms/geli/issues/858)
- Migration for `visible` field. [#890](https://github.com/geli-lms/geli/pull/890)
- Migration for `fileUnitType` field. [#907](https://github.com/geli-lms/geli/pull/907)
- My courses: Make title or teaser image clickable [#904](https://github.com/geli-lms/geli/issues/904)

### Changed
Expand Down Expand Up @@ -97,6 +98,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `AuthController` `addWhitelistedUserToCourses` broken condition & typos. [#895](https://github.com/geli-lms/geli/issues/895)
- `ChatRoomController` internal data leak. [#897](https://github.com/geli-lms/geli/issues/897)
- Error on clicking on notification. [#916](https://github.com/geli-lms/geli/issues/916)
- Depcreated warning on startup. [#920](https://github.com/geli-lms/geli/pull/920)

### Security
- Secured the static `'uploads'` route by introducing a special `'mediaToken'` with new JWT strategy & middleware. [#729](https://github.com/geli-lms/geli/issues/729)
Expand Down
24 changes: 24 additions & 0 deletions api/src/migrations/scripts/20181019-fileUnit.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// tslint:disable:no-console

import {Unit} from '../../models/units/Unit';
import {IFileUnitModel} from '../../models/units/FileUnit';

class FileUnitMigration20181019 {

async up() {
const fileUnitTypeMissing: IFileUnitModel[] = <any>await Unit.find({__t: 'file', fileUnitType: {$exists: false}});

for (const unit of fileUnitTypeMissing) {
try {
unit.fileUnitType = 'file';
await unit.save({validateBeforeSave: false});
} catch (error) {
console.log('Could not add "fileUnitType" to unit ' + unit.name + ' error: ' + error);
}
}

return true;
}
}

export = FileUnitMigration20181019;
4 changes: 2 additions & 2 deletions api/src/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ export class Server {
}

start() {
mongoose.connect(config.database);
mongoose.connect(config.database, {useNewUrlParser: true});

// Request logger
this.app.use(morgan('combined'));

const server = this.app.listen(config.port, () => {
process.stdout.write('Server successfully started at port ' + config.port);
});
Expand Down

0 comments on commit 3ab2d46

Please sign in to comment.