16 lines
364 B
TypeScript
16 lines
364 B
TypeScript
import { cloudService } from './index'
|
|
import { ISession } from '@/types/auth'
|
|
|
|
export const loginAdminApi = (username: string, password: string): Promise<ISession> => {
|
|
const data = new FormData()
|
|
data.append('username', username)
|
|
data.append('password', password)
|
|
|
|
return cloudService({
|
|
url: '/blog-api/session',
|
|
method: 'post',
|
|
data
|
|
})
|
|
}
|
|
|