<%_ if (position === 'import') { _%>
<%_ } _%>
<%_ if (position === 'method') { _%>
  <%_ if (clientTheme === 'vben' && clientFramework === 'vue') { _%>
  // prettier-ignore
  result(id: <%- primaryKey.tsType%>): Promise<any> {
    return new Promise<any>((resolve, reject) => {
      axios.get(`${apiUrl}/result/${id}`)
           .then(res => { resolve(res); })
           .catch(err => { reject(err);});
    });
  },
  <%_ } _%>
  <%_ if (clientTheme === 'antd' && clientFramework === 'react') { _%>

export async function result(id: <%- primaryKey.tsType %>): Promise<any> {
  return request<any>(`${apiUrl}/result/${id}`);
}
  <%_ } _%>
  <%_ if (clientFramework === 'angular' && clientFramework === 'alain') { _%>

  result(id: <%- primaryKey.tsType %>): Observable<any> {
    return this.http.get<any>(`${this.resourceUrl}/result/${id}`);
  }
  <%_ } _%>
<%_ } _%>
