diff --git a/src/activities/entities/activity-route.entity.ts b/src/activities/entities/activity-route.entity.ts index 50019c1..235a8f8 100644 --- a/src/activities/entities/activity-route.entity.ts +++ b/src/activities/entities/activity-route.entity.ts @@ -62,10 +62,10 @@ export const firstTrTickAscentTypes = new Set([ ]); export enum PublishType { - PUBLIC = 'public', - CLUB = 'club', - LOG = 'log', - PRIVATE = 'private', + public = 'public', + club = 'club', + log = 'log', + private = 'private', } registerEnumType(PublishType, { name: 'PublishType', @@ -123,7 +123,7 @@ export class ActivityRoute extends BaseEntity { @Column({ type: 'enum', enum: PublishType, - default: PublishType.PRIVATE, + default: PublishType.private, }) @Field((type) => PublishType) publish: PublishType; diff --git a/src/crags/entities/crag.entity.ts b/src/crags/entities/crag.entity.ts index ada4b81..f91840e 100644 --- a/src/crags/entities/crag.entity.ts +++ b/src/crags/entities/crag.entity.ts @@ -41,34 +41,34 @@ export enum CragType { } export enum Orientation { - NORTH = 'north', - NORTHEAST = 'northeast', - EAST = 'east', - SOUTHEAST = 'southeast', - SOUTH = 'south', - SOUTHWEST = 'southwest', - WEST = 'west', - NORTHWEST = 'northwest', + north = 'north', + northeast = 'northeast', + east = 'east', + southeast = 'southeast', + south = 'south', + southwest = 'southwest', + west = 'west', + northwest = 'northwest', } registerEnumType(Orientation, { name: 'Orientation', }); export enum WallAngle { - SLAB = 'slab', - VERTICAL = 'vertical', - OVERHANG = 'overhang', - ROOF = 'roof', + slab = 'slab', + vertical = 'vertical', + overhang = 'overhang', + roof = 'roof', } registerEnumType(WallAngle, { name: 'WallAngle', }); export enum Season { - SPRING = 'spring', - SUMMER = 'summer', - AUTUMN = 'autumn', - WINTER = 'winter', + spring = 'spring', + summer = 'summer', + autumn = 'autumn', + winter = 'winter', } registerEnumType(Season, { name: 'Season', diff --git a/test/e2e/activity.e2e-spec.ts b/test/e2e/activity.e2e-spec.ts index 1538ca8..ca4d626 100644 --- a/test/e2e/activity.e2e-spec.ts +++ b/test/e2e/activity.e2e-spec.ts @@ -308,7 +308,7 @@ describe('Activity', () => { response.body.data.activities.items.filter( (a) => a.routes.filter( - (ar) => ![PublishType.PUBLIC].includes(ar.publish.toLowerCase()), + (ar) => ![PublishType.public].includes(ar.publish.toLowerCase()), ).length > 0, ).length; expect(numOfNonPublicActivityRoutes).toEqual(0); @@ -317,7 +317,7 @@ describe('Activity', () => { response.body.data.activities.items.filter( (a) => !a.routes.some((ar) => - [PublishType.PUBLIC].includes(ar.publish.toLowerCase()), + [PublishType.public].includes(ar.publish.toLowerCase()), ), ).length; expect(numOfActivitiesWithNoPublicActivityRoutes).toEqual(0); diff --git a/test/e2e/activityMutations.e2e-spec.ts b/test/e2e/activityMutations.e2e-spec.ts index 1d1067a..b4d0ec6 100644 --- a/test/e2e/activityMutations.e2e-spec.ts +++ b/test/e2e/activityMutations.e2e-spec.ts @@ -105,7 +105,7 @@ describe('ActivityMutations', () => { routes: [ { ascentType: "${AscentType.onsight}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockData.crags.publishedCrag.sectors.publishedSector.routes.publishedRoute.id}" } diff --git a/test/e2e/activityRoutes.e2e-spec.ts b/test/e2e/activityRoutes.e2e-spec.ts index 182b638..6f10eaa 100644 --- a/test/e2e/activityRoutes.e2e-spec.ts +++ b/test/e2e/activityRoutes.e2e-spec.ts @@ -61,85 +61,85 @@ describe('Activity', () => { routes: [ { ascentType: "${AscentType.onsight}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[0].id}" }, { ascentType: "${AscentType.flash}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[1].id}" }, { ascentType: "${AscentType.redpoint}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[2].id}" }, { ascentType: "${AscentType.repeat}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[2].id}" } { ascentType: "${AscentType.allfree}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[3].id}" }, { ascentType: "${AscentType.aid}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[4].id}" }, { ascentType: "${AscentType.attempt}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[5].id}" }, { ascentType: "${AscentType.t_onsight}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[6].id}" }, { ascentType: "${AscentType.t_flash}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[7].id}" }, { ascentType: "${AscentType.t_redpoint}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[8].id}" }, { ascentType: "${AscentType.t_repeat}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[8].id}" }, { ascentType: "${AscentType.t_allfree}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[9].id}" }, { ascentType: "${AscentType.t_aid}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[10].id}" } { ascentType: "${AscentType.t_attempt}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[11].id}" } diff --git a/test/e2e/routeMigration.e2e-spec.ts b/test/e2e/routeMigration.e2e-spec.ts index 751b943..13463cf 100644 --- a/test/e2e/routeMigration.e2e-spec.ts +++ b/test/e2e/routeMigration.e2e-spec.ts @@ -233,7 +233,7 @@ describe('RouteMigration', () => { routes: [ { ascentType: "${AscentType.onsight}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[0].id}" } @@ -316,7 +316,7 @@ describe('RouteMigration', () => { routes: [ { ascentType: "${AscentType.redpoint}", - publish: "${PublishType.PUBLIC}", + publish: "${PublishType.public}", date: "2017-03-07", routeId: "${mockRoutes[1].id}" } diff --git a/test/e2e/user-delete.e2e-spec.ts b/test/e2e/user-delete.e2e-spec.ts index a06f127..52d56ea 100644 --- a/test/e2e/user-delete.e2e-spec.ts +++ b/test/e2e/user-delete.e2e-spec.ts @@ -57,14 +57,14 @@ describe('UserDelete', () => { { route: mockData.crags.simpleCrag.sectors.simpleSector1.routes[0], ascentType: AscentType.redpoint, - publishType: PublishType.PRIVATE, + publishType: PublishType.private, votedDifficulty: 1100, votedStarRating: 2, }, { route: mockData.crags.simpleCrag.sectors.simpleSector1.routes[1], ascentType: AscentType.onsight, - publishType: PublishType.PUBLIC, + publishType: PublishType.public, }, ], ); @@ -82,7 +82,7 @@ describe('UserDelete', () => { { route: mockData.crags.simpleCrag.sectors.simpleSector1.routes[0], ascentType: AscentType.redpoint, - publishType: PublishType.PRIVATE, + publishType: PublishType.private, votedDifficulty: 1200, votedStarRating: 2, }, @@ -91,7 +91,7 @@ describe('UserDelete', () => { { route: mockData.crags.simpleCrag.sectors.simpleSector1.routes[0], ascentType: AscentType.redpoint, - publishType: PublishType.PRIVATE, + publishType: PublishType.private, votedDifficulty: 1300, votedStarRating: 2, }, @@ -103,7 +103,7 @@ describe('UserDelete', () => { { route: mockData.crags.simpleCrag.sectors.simpleSector1.routes[0], ascentType: AscentType.redpoint, - publishType: PublishType.PRIVATE, + publishType: PublishType.private, votedStarRating: 2, }, ]); @@ -111,7 +111,7 @@ describe('UserDelete', () => { { route: mockData.crags.simpleCrag.sectors.simpleSector1.routes[0], ascentType: AscentType.redpoint, - publishType: PublishType.PRIVATE, + publishType: PublishType.private, votedStarRating: 2, }, ]);