Update ResourceController.cs

Added resource flow control.