Skip to content

Commit

Permalink
Preparation for integrating new API
Browse files Browse the repository at this point in the history
- Move old API calls out of api folder and into rpc folder
- Deleted API folder
- Minor bug fix within schema dev file
  • Loading branch information
egbot committed Jan 11, 2022
1 parent cce3f21 commit ce19d95
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 99 deletions.
33 changes: 0 additions & 33 deletions api/index.php

This file was deleted.

40 changes: 0 additions & 40 deletions api/taxonomy/index.php

This file was deleted.

40 changes: 20 additions & 20 deletions config/schema-1.0/dev/db_schema_patch-dev.sql
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,26 @@ CREATE TABLE `omcollproperties` (
CONSTRAINT `FK_omcollproperties_collid` FOREIGN KEY (`collid`) REFERENCES `omcollections` (`CollID`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FK_omcollproperties_uid` FOREIGN KEY (`modifiedUid`) REFERENCES `users` (`uid`) ON DELETE CASCADE ON UPDATE CASCADE);

CREATE TABLE `portalindex` (
`portalIndexID` INT NOT NULL AUTO_INCREMENT,
`portalName` VARCHAR(45) NOT NULL,
`acronym` VARCHAR(45) NULL,
`portalDescription` VARCHAR(250) NULL,
`urlRoot` VARCHAR(150) NOT NULL,
`securityKey` VARCHAR(45) NULL,
`symbVersion` VARCHAR(45) NULL,
`guid` VARCHAR(45) NULL,
`manager` VARCHAR(45) NULL,
`managerEmail` VARCHAR(45) NULL,
`primaryLead` VARCHAR(45) NULL,
`primaryLeadEmail` VARCHAR(45) NULL,
`notes` VARCHAR(250) NULL,
`initialTimestamp` TIMESTAMP NULL DEFAULT current_timestamp,
PRIMARY KEY (`portalIndexID`));

ALTER TABLE `portalindex`
ADD UNIQUE INDEX `UQ_portalIndex_guid` (`guid` ASC);

ALTER TABLE `omcollpublications`
DROP FOREIGN KEY `FK_adminpub_collid`;

Expand Down Expand Up @@ -246,26 +266,6 @@ ALTER TABLE `omoccurrences`
DROP COLUMN `recordedbyid`,
DROP INDEX `FK_recordedbyid` ;

CREATE TABLE `portalindex` (
`portalIndexID` INT NOT NULL AUTO_INCREMENT,
`portalName` VARCHAR(45) NOT NULL,
`acronym` VARCHAR(45) NULL,
`portalDescription` VARCHAR(250) NULL,
`urlRoot` VARCHAR(150) NOT NULL,
`securityKey` VARCHAR(45) NULL,
`symbVersion` VARCHAR(45) NULL,
`guid` VARCHAR(45) NULL,
`manager` VARCHAR(45) NULL,
`managerEmail` VARCHAR(45) NULL,
`primaryLead` VARCHAR(45) NULL,
`primaryLeadEmail` VARCHAR(45) NULL,
`notes` VARCHAR(250) NULL,
`initialTimestamp` TIMESTAMP NULL DEFAULT current_timestamp,
PRIMARY KEY (`portalIndexID`));

ALTER TABLE `portalindex`
ADD UNIQUE INDEX `UQ_portalIndex_guid` (`guid` ASC);

ALTER TABLE `specprocessorprojects`
ADD COLUMN `customStoredProcedure` VARCHAR(45) NULL AFTER `source`,
ADD COLUMN `createdByUid` INT UNSIGNED NULL AFTER `lastrundate`,
Expand Down
4 changes: 2 additions & 2 deletions js/symb/api.taxonomy.taxasuggest.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var acUrlBase = "/api/taxonomy/taxasuggest.php";
var acUrlBase = "/rpc/taxasuggest.php";
var acUrl = acUrlBase;

$(document).ready(function() {
Expand Down Expand Up @@ -109,7 +109,7 @@ function validateTaxon(f,submitForm){
else{
$.ajax({
type: "POST",
url: "../api/taxonomy/gettaxon.php",
url: "../rpc/gettaxon.php",
dataType: "json",
data: { sciname: f.taxa.value }
}).done(function( taxaObj ) {
Expand Down
2 changes: 1 addition & 1 deletion js/symb/checklists.checklist.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ function validateAddSpecies(f){
else{
$.ajax({
type: "POST",
url: "../api/taxonomy/gettaxon.php",
url: "../rpc/gettaxon.php",
dataType: "json",
data: { sciname: sciName }
}).done(function( taxaObj ) {
Expand Down
4 changes: 2 additions & 2 deletions api/taxonomy/gettaxon.php → rpc/gettaxon.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/*
* Input: string representing scientific name
* Return: array containing tid (key), name, author, and kingdom (if name is homonym)
*
*
*/
include_once('../../config/symbini.php');
include_once('../config/symbini.php');
include_once($SERVER_ROOT.'/classes/APITaxonomy.php');
header("Content-Type: text/html; charset=".$CHARSET);

Expand Down
2 changes: 1 addition & 1 deletion api/taxonomy/taxasuggest.php → rpc/taxasuggest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
include_once('../../config/symbini.php');
include_once('../config/symbini.php');
include_once($SERVER_ROOT.'/classes/TaxonSearchSupport.php');

$term = (array_key_exists('term',$_REQUEST)?$_REQUEST['term']:'');
Expand Down

0 comments on commit ce19d95

Please sign in to comment.