Skip to content

Commit

Permalink
Feat: implement update user route.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fullstack Mechanic authored and Fullstack Mechanic committed Aug 4, 2024
1 parent ac00c5d commit db59807
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 27 deletions.
24 changes: 0 additions & 24 deletions src/models/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,6 @@ export class User extends ExtendedBaseEntity {
@Column({ nullable: false })
last_name: string;

@Column({ nullable: false })
username: string;

@Column({ nullable: false })
bio: string;

@Column({ nullable: false })
job_title: string;

@Column({ nullable: false })
language: string;

@Column({ nullable: false })
pronouns: string;

@Column({ nullable: false })
department: string;

@Column({ nullable: false })
social_links: string;

@Column({ nullable: false })
timezones: string;

@Column({ unique: true, nullable: false })
@IsEmail(undefined, { message: getIsInvalidMessage("Email") })
email: string;
Expand Down
6 changes: 3 additions & 3 deletions src/services/userservice.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { User } from "../models/user";
import { User, Profile } from "../models/user";

Check failure on line 1 in src/services/userservice.ts

View workflow job for this annotation

GitHub Actions / test

Module '"../models/user"' declares 'Profile' locally, but it is not exported.
import AppDataSource from "../data-source";
import { ResourceNotFound } from "../middleware";

Expand All @@ -20,8 +20,8 @@ export class UserService {

static async updateUserById(
id: string,
updateData: Partial<User>,
): Promise<User> {
updateData: Partial<Profile>,
): Promise<Profile> {
const userRepository = AppDataSource.getRepository(User);
let user = await userRepository.findOne({
where: { id },
Expand Down

0 comments on commit db59807

Please sign in to comment.