12 lines
422 B
TypeScript
12 lines
422 B
TypeScript
import { Action } from "../types/Action";
|
|
import DownloadFileHandler from "./DownloadFileHandler";
|
|
import NoopHandler from "./NoopHandler";
|
|
import { ResponseHandler } from "./RepsonseHandler";
|
|
|
|
export function getHandler(action: Action): ResponseHandler {
|
|
switch(action) {
|
|
case Action.DOWNLOAD: return DownloadFileHandler;
|
|
case Action.UPLOAD: return NoopHandler;
|
|
case Action.DELETE: return NoopHandler;
|
|
}
|
|
} |