You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
OneAuth/oaer/lib/api/app.ts

29 lines
616 B
TypeScript

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/*
* @name: app
* @author: veypi <i@veypi.com>
* @date: 2021-11-17 14:44
* @descriptionap
* @update: 2021-11-17 14:44
*/
import ajax from './axios'
import cfg from '../cfg'
export default {
local: () => cfg.BaseUrl() + '/app/',
getKey(uuid: string) {
return ajax.get(this.local() + uuid, { option: 'key' })
},
get(uuid: string) {
return ajax.get(this.local() + uuid)
},
list() {
return ajax.get(this.local())
},
users(uuid: string, user_id: string, data?: any) {
if (uuid === '') {
uuid = '-'
}
return ajax.get(this.local() + uuid + '/user/' + user_id, data)
},
}