Skip to content
Commits on Source (4)
......@@ -6,7 +6,7 @@ stages:
- test
- package
- ship
# - deploy
- deploy
# https://docs.gitlab.com/ee/ci/yaml/#globally-defined-image-services-cache-before_script-after_script
default:
......@@ -153,25 +153,28 @@ release:
# deploys production artifacts.
# does not run inside merge requests
# .deploy_to_prod: &deploy
# stage: deploy
# script:
# - rsync -avhP LICENSE *.json .npmrc dist $DEPLOY_DIR
# - npm ci
# only:
# refs:
# - master
# except:
# - merge_requests
# API 1:
# <<: *deploy
# tags:
# - shell
# - api1
# API 2:
# <<: *deploy
# tags:
# - shell
# - api2
.deploy_to_prod: &deploy
stage: deploy
script:
- cp -av bundle.tar.xz $DEPLOY_DIR
- mv $DEPLOY_DIR/dist $DEPLOY_DIR/dist.old
- tar -xvJf bundle.tar.xz -C $DEPLOY_DIR/
- rm -rf $DEPLOY_DIR/dist.old
- npm ci
only:
refs:
- master
except:
- merge_requests
API 1:
<<: *deploy
tags:
- shell
- api1
API 2:
<<: *deploy
tags:
- shell
- api2
## [1.5.1](https://git.covalent.space/varrel/project-lithium/lithium-server-node/compare/v1.5.0...v1.5.1) (2023-01-04)
### Bug Fixes
* **ci:** uncomment deploy stage ([a49db04](https://git.covalent.space/varrel/project-lithium/lithium-server-node/commit/a49db04a9bd3c7b9e39b3b19946801a4332aa253))
# [1.5.0](https://git.covalent.space/varrel/project-lithium/lithium-server-node/compare/v1.4.2...v1.5.0) (2023-01-04)
......
......@@ -2,4 +2,6 @@ export class CreateUserDto {
email: string;
username: string;
password: string;
firstname: string;
lastname: string;
}
import { PartialType } from '@nestjs/swagger';
import { CreateUserDto } from './create-user.dto';
import { PermissionRole } from '../../permissions/enums';
export class UpdateUserDto extends PartialType(CreateUserDto) {
email?: string;
username?: string;
password?: string;
firstname?: string;
lastname?: string;
role?: PermissionRole;
}
......@@ -6,16 +6,16 @@ import { Project } from '../../projects/entities/project.entity';
@Entity({ name: 'users' })
export class User extends AbstractEntity {
@Column({
length: 50,
length: 254, //https://stackoverflow.com/questions/1199190/what-is-the-optimal-length-for-an-email-address-in-a-database
unique: true,
})
email: string;
@Column({ length: 50, unique: true })
@Column({ length: 20, unique: true })
username: string;
@Column({ length: 50 })
firstname: string | null;
firstname: string;
@Column({ length: 50 })
lastname: string;
......@@ -39,9 +39,9 @@ export class User extends AbstractEntity {
super();
this.email = email;
this.password = password;
this.username = username || '';
this.firstname = firstname || null;
this.firstname = lastname || '';
this.username = username;
this.firstname = firstname;
this.lastname = lastname;
this.role = PermissionRole.GUEST; // default to lowest perm level
}
}