This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hmm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 BingPreview/1.0b" | |
1 (compatible;PetalBot;+https://webmaster.petalsearch.com/site/petalbot)" | |
1 "curl/7.58.0" | |
1 "Java/11.0.13" | |
1 PetalBot;+https://webmaster.petalsearch.com/site/petalbot)" | |
2 "curl/7.68.0" | |
2 [FB_IAB/FB4A;FBAV/353.0.0.34.116;]" | |
2 +http://www.google.com/bot.html)" | |
2 OPR/83.0.4254.27" | |
3 "adalo-database" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"go.m3o.com/db" | |
) | |
// Read data from a table. Lookup can be by ID or via querying any field in the record. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Db interface { | |
Count(*CountRequest) (*CountResponse, error) | |
Create(*CreateRequest) (*CreateResponse, error) | |
Delete(*DeleteRequest) (*DeleteResponse, error) | |
DropTable(*DropTableRequest) (*DropTableResponse, error) | |
ListTables(*ListTablesRequest) (*ListTablesResponse, error) | |
Read(*ReadRequest) (*ReadResponse, error) | |
RenameTable(*RenameTableRequest) (*RenameTableResponse, error) | |
Truncate(*TruncateRequest) (*TruncateResponse, error) | |
Update(*UpdateRequest) (*UpdateResponse, error) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"go.m3o.com/db" | |
) | |
// Create a record in the database. Optionally include an "id" field otherwise it's set automatically. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"go.m3o.com/user" | |
) | |
// Send a verification email |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"go.m3o.com/user" | |
) | |
// Create a new user account. The email address and username for the account must be unique. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# chkconfig: 345 20 80 | |
# description: Builds and runs OSRM | |
# This script builds OSRM Planet | |
# It will create builds for 3 profiles; car, bike, foot | |
# There is not any backup as of yet | |
# Source function library. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export var BaseURL = 'http://localhost:8080' | |
if(process.env.MICRO_API_ENDPOINT?.length) { | |
BaseURL = process.env.MICRO_API_ENDPOINT | |
} | |
// call makes HTTP JSON calls to the Micro API. If the request succeeds (200), the response body is | |
// returned, otherwise the error is parsed from the response body and returned in the reject. If no | |
// error is returned in the response body, the response status text is returned. | |
export default function call(path: string, params?: any): Promise<any> { | |
return new Promise<any>((resolve: any, reject: any) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { NextApiRequest, NextApiResponse } from 'next' | |
import call, { BaseURL } from '../../../../lib/micro' | |
import TokenFromReq from '../../../../lib/token' | |
export default async function handler(req: NextApiRequest, res: NextApiResponse) { | |
const { query: { group_id } } = req | |
if(req.method !== 'GET' && req.method !== 'PATCH') { | |
res.status(405) | |
return |
NewerOlder