This commit is contained in:
禾几海
2020-08-01 13:31:10 +08:00
parent c75b17fa05
commit a6c3f16ddf
2 changed files with 21 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ import {ArticleReq} from '../class/Article';
import {Category, Tag} from '../class/Tag';
import {Comment} from '../class/Comment';
import {CommentReq} from '../class/Comment';
import {Link} from '../class/Link';
import {ApplyLinkReq, Link} from '../class/Link';
import {User} from '../class/User';
import {LoginReq} from '../class/User';
@@ -292,13 +292,20 @@ export class ApiService extends HttpService {
});
}
applyLink(link: Link) {
applyLink(link: ApplyLinkReq) {
return super.Service<string>({
path: '/apply',
method: 'POST',
data: link
});
}
reapplyLink(keyStr: string) {
return super.Service<string>({
path: '/apply',
method: 'POST',
queryParam: {
name: link.name,
url: link.url
key: keyStr
}
});
}

View File

@@ -6,3 +6,13 @@ export class Link {
iconPath: string;
desc: string;
}
export class ApplyLinkReq {
desc: string;
email: string;
iconPath: string;
linkUrl: string;
name: string;
url: string
}