Exemplo n.º 1
0
 [FunctionName(HTTP.Endpoints.RESET)]  /* API Endpoint: /api/reset */
 public static async Task <string> Reset([HttpTrigger(AuthorizationLevel.Anonymous, HTTP.GET, Route = HTTP.Endpoints.RESET)] HttpRequest req)
 {
     try {
         /* Drops old tables and creates new ones with updated fields */
         return(SQLHandler.Drop(Database.ALL_TABLES) + SQLHandler.Create(Database.ALL_TABLE_DEFINITIONS));
     } catch (Exception ex) {
         return(ex.ToString());
     }
     return(new InvalidOperationException().ToString());
 }