Skip to content

Commit

Permalink
fix api
Browse files Browse the repository at this point in the history
  • Loading branch information
melicheradam committed May 8, 2022
1 parent f6ad488 commit 4580aba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion adonisApi/app/Models/Channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default class Channel extends BaseModel {
public messages: HasMany<typeof Message>

@manyToMany(() => User, {
pivotTable: 'channels_users',
pivotTable: 'channel_users',
pivotForeignKey: 'channel_id',
pivotRelatedForeignKey: 'user_id',
pivotTimestamps: true,
Expand Down
2 changes: 1 addition & 1 deletion adonisApi/app/Models/User.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default class User extends BaseModel {
public updatedAt: DateTime

@manyToMany(() => Channel, {
pivotTable: 'channels_users',
pivotTable: 'channel_users',
pivotForeignKey: 'user_id',
pivotRelatedForeignKey: 'channel_id',
pivotTimestamps: true,
Expand Down

0 comments on commit 4580aba

Please sign in to comment.