Feat: bot failed state to show/hide llm restart btn
This commit is contained in:
		| @@ -15,6 +15,20 @@ type RoomsRepo interface { | ||||
| 	RoomCreate(ctx context.Context, room *models.Room) error | ||||
| 	RoomDeleteByID(ctx context.Context, id string) error | ||||
| 	RoomUpdate(ctx context.Context, room *models.Room) error | ||||
| 	RoomSetBotFailed(ctx context.Context, roomID string) error | ||||
| 	RoomUnSetBotFailed(ctx context.Context, roomID string) error | ||||
| } | ||||
|  | ||||
| func (p *RepoProvider) RoomSetBotFailed(ctx context.Context, roomID string) error { | ||||
| 	db := getDB(ctx, p.DB) | ||||
| 	_, err := db.ExecContext(ctx, "UPDATE rooms SET bot_failed = true WHERE id = ?", roomID) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func (p *RepoProvider) RoomUnSetBotFailed(ctx context.Context, roomID string) error { | ||||
| 	db := getDB(ctx, p.DB) | ||||
| 	_, err := db.ExecContext(ctx, "UPDATE rooms SET bot_failed = false WHERE id = ?", roomID) | ||||
| 	return err | ||||
| } | ||||
|  | ||||
| func (p *RepoProvider) RoomList(ctx context.Context) ([]*models.Room, error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Grail Finder
					Grail Finder